im using Asynchronous Http Client which can be found here: http://loopj.com/android-async-http/
and it works fine, except for about 1 out of every 10 or so requests that I end up giving me an endless dialogue on progress, which I think means for some reason, no kind answer is coming back, because I wrote code to reject the dialogue in onSuccess AND onFailure, so I was a little confused about how this could happen.
Here is my code that sets up the request:
public static void post(String token,String url, RequestParams params, AsyncHttpResponseHandler responseHandler) { Log.i(token,"token"); client.addHeader("token", token); client.setTimeout(3000); client.post(url, params, responseHandler); }
And this is where I redefine onSuccess and onFailure:
@Override public void onFailure(Throwable arg0, String arg1) {
source share