Android, Volley Request, the response is blocking main thread Android, Volley Request, the response is blocking main thread multithreading multithreading

Android, Volley Request, the response is blocking main thread


onResponse and onErrorResponse is called on UI thread hence any heavy operation done inside these methods will make you application less responsive. I guess you are trying to parse the response in onResponse() which is incorrect.

You have to move to parsing logic to parseNetworkResponse since this is the method which is called in background thread. Refer the below link for more details :

https://developer.android.com/training/volley/request-custom.html


If it help someone , try to create a new thread in a method inside onResponse , inside that thread execute your parsing data. I hope the answer works for you