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
Volley request policy only one time request to avoid duplicate post
I tried this solution, but does not working
//...........solution 01
jsonObjectRequest.retryPolicy = DefaultRetryPolicy(
120000,
0,
DefaultRetryPolicy.DEFAULT_BACKOFF_MULT)
or
//...........solution 02
jsonObjectRequest.retryPolicy = DefaultRetryPolicy(
0,
-1,
DefaultRetryPolicy.DEFAULT_BACKOFF_MULT)
MySingleton.getInstance(this).addToRequestQueue(jsonObjectRequest)
Full Source Code: https://androidkeynotes.blogspot.com/2020/02/volley.html