I am writing an app that performs a series of requests with Google's Volley API. The problem is that I don't know when the requests have finished. And I need to know if a request has finished before I move further. I can't just wait a certain amount of time with a while loop or sleep/wait method because it seems to halt the thread that the requests are being executed on. Obviously the requests have onResponse callbacks which I can use to mark when the single request is done. But I have an activity that makes multiple requests and I want that activity to be on standby until all requests have been processed. And like I said I can't simply wait/sleep because that makes the request queue sleep. Would I need to write a service that monitors the requests? I'm not really sure how to go about this.
P.S. I'm using a singleton request queue described here.