Description
Hello,
I don't understand something about the new 1.4.5 version, the previous one 1.4.4 was wordking fine !
With the new API I just changed the onSucces (previously onSuccess(String response), now with 3 parameters
I Have a class:
public class Webservice extends Thread
{
private AsyncHttpClient httpClient;
public Webservice(Activity a)
{
httpClient = new AsyncHttpClient();
...
}
@Override
public void run()
{
....
httpClient.post(activity.getString(R.string.url_api),params,new AsyncHttpResponseHandler( ){
@Override
public void onSuccess(int statusCode, Header[] headers, byte[] response)
{
}
});
}
}
Now I have error : current thead has not called Looper.prepare() Forcing synchronous mode;
Tried to add Looper.prepare in the construcor but crash the app.
and another error Synchronous ResponsHangdler in AsyncHttpClient.
Maybe the fix is just to remove the check for Looper.prepare==null ?
I dont really undestand this but.
I think it's related to this change : Fixed Threading issue when used in Service or non-UI Thread context
Because I use it in a thread. But can you add an optino to force async mode, or should I use sync mode ?