How does Android Volley handle temporarily loss of network connection?

后端 未结 5 1795
野趣味
野趣味 2021-02-08 14:27

If an Android Volley post request fails due to network loss, will Android Volley retry the post after the network connection is restored automatically? Will it fire all of the r

5条回答
  •  后悔当初
    2021-02-08 15:09

    if you use (AsyncHttpClient) you can try call this methode :

    setMaxRetriesAndTimeout(int retries, int timeout)
     Sets the maximum number of retries and timeout for a particular Request.
     *
     * @param retries maximum number of retries per request
     * @param timeout sleep between retries in milliseconds
     */
    

提交回复
热议问题