I use the new Volley framework for Android to do a request to my server. But it timeouts before getting the response, although it does respond.
I tried adding this
Alternative solution if all above solutions are not working for you
By default, Volley set timeout equally for both setConnectionTimeout() and setReadTimeout() with the value from RetryPolicy. In my case, Volley throws timeout exception for large data chunk see:
com.android.volley.toolbox.HurlStack.openConnection().
My solution is create a class which extends HttpStack with my own setReadTimeout() policy. Then use it when creates RequestQueue as follow:
Volley.newRequestQueue(mContext.getApplicationContext(), new MyHurlStack())