Skip to content Skip to sidebar Skip to footer

Make Volley Request In Different Thread

I would like to make a request using the Android Volley library in a different thread. What I mean is, there is the connection which is in the thread and the data is processed in t

Solution 1:

Every network request performed by Volley is performed in a background thread. Volley takes care of this behind the scenes. So there is no need to perform a request on a different thread, since that's already happening.

The listeners, on the other hand, are called on the UI thread.

You basically answered your own question when you wrote that the data is processed on the UI thread. Simply move that data processing that is performed inside your listeners to a background thread / AsyncTask to free your UI thread and prevent the blocking.

Post a Comment for "Make Volley Request In Different Thread"