Not getting a response when using Android Async HTTP (from loopj)
Posted
by
conor
on Stack Overflow
See other posts from Stack Overflow
or by conor
Published on 2012-09-10T15:35:54Z
Indexed on
2012/09/10
15:38 UTC
Read the original article
Hit count: 721
I am using the Async Http library from loopj.com and also the sample code from the site.
The problem is that when the request is made I don't get a response. I have even overridden the onFinish() function which isn't getting fire either.
I am using the sample code from their site which is as follows:
import com.loopj.android.http.AsyncHttpClient;
import com.loopj.android.http.AsyncHttpResponseHandler;
Log.v("bopzy_debug", "Testing HTTP Connectivity");
System.out.println("123");
AsyncHttpClient client = new AsyncHttpClient();
client.get("http://www.google.com",
new AsyncHttpResponseHandler() {
@Override
public void onSuccess(String response) {
Log.v("bopzy_debug", response);
}
@Override
public void onFinish() {
Log.v("bopzy_debug", "Finished..");
}
});
Any ideas on how to solve would be greatly appreciated, not really sure what is going on here.
© Stack Overflow or respective owner