I am trying to hit a rest service using Volley.
public class AuthFunctions {
private static final String LOGIN_URL = \"http://10.0.2.2:8080/stewayservic
Check out that your IPv4 Address in the URL is correct and has not been changed.
5 year old question is tough to deal with today's problem.
Volley will no more accept http and ip address. Will accept only https with fqdn only.
This worked for me:
request.setRetryPolicy(new RetryPolicy() {
@Override
public int getCurrentTimeout() {
return 50000;
}
@Override
public int getCurrentRetryCount() {
return 50000;
}
@Override
public void retry(VolleyError error) throws VolleyError {
}
});
You can change that time.
Add the following after your error listener
myRequest.setRetryPolicy(new DefaultRetryPolicy(
MY_SOCKET_TIMEOUT_MS,
DefaultRetryPolicy.DEFAULT_MAX_RETRIES,
DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
com.android.volley.TimeoutError
In 75% cases this error is occured due to connectivity issue '
if you are testing on localhost or local server
Check firewall is off
On Macbook I was running a Django application written in python3.X.
I had to do the following.