I have a problem with Volley POST request on slow network. Everytime I see BasicNetwork.logSlowRequests
in my LogCat, my POST request is executed twice or more
This works for me.
public class MyRetryPolicyWithoutRetry implements RetryPolicy
{
@override
public int getCurrentTimeout()
{
return CONNECTION_TIME_OUT; /200000/
}
@Override
public int getCurrentRetryCount()
{
return 0;
}
@Override
public void retry(VolleyError error) throws VolleyError
{
throw(error);
}
}
To use:
request.setRetryPolicy(new MyRetryPolicyWithoutRetry());