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
The only way I got the double requests to stop was to set the retry policy retries to -1
request.setRetryPolicy(new DefaultRetryPolicy(0, -1, 0));
I think this is because the DefaultRetryPolicy's logic for attempts remaining returns true if retryCount is 0 and Max retries is also 0 in the hasAttemptRemaining() method:
protected boolean hasAttemptRemaining() {
return this.mCurrentRetryCount <= this.mMaxNumRetries;
}