I'm developing an app for Android. I made a class to parse an xml, when I load a local xml file it works, now I want to load an xml file from a web site. So I thought to use AsyncHttpClient to get the xml file and pass it to my parser. I made it so:
AsyncHttpClient client = new AsyncHttpClient();
client.get(url, new AsyncHttpResponseHandler() {
@Override
public void onSuccess(String response) {
super.onSuccess(response);
XmlParse xmlParse = new XmlParse(response);
xmlParse.parseXml();
}
});
But when I try to load the xml file I've trouble because it doesn't call the onSuccess method. Can anyone help me to solve this issue? Thank you