I want to create a loading page when request is process. But I have multiple requests running at the some time. Is there any event is triggered when all requests are done?
I want to create a loading page when request is process. But I have multiple requests running at the some time. Is there any event is triggered when all requests are done?
A common technique is to use closures to drive the logic for evaluating responses from calls to the service. If you're using one of our SDKs, we make this as simple as possible with callbacks to success and error functionality.
I'm using unity sdk. I know the callbacks to success and error function. But I have multiple request running at the same time. I want the effect that the loading page pop up when there are still requests running, when all request process done, the loading page dismiss.
It's hard to check every request's call backup function.
Well first, it's recommended that you serialize requests. Running multiple simultaneous requests could become an issue, if you have many requests in that logic flow. Can you provide more details on the specifics of your scenario?
If you have multiple simultaneous requests in flight, there's technically no way to know for certain which will finish last, so you do need to have some local tracking to determine when you have all the information required to proceed. You could do this via locking logic that tracks on outstanding requests, but this is not built into the SDKs for the reason stated.
Thank you for the answer. How to serialize the requests? Run them one by one ?
2 People are following this question.