Java – asynchttpclient does not have onsuccess or onfailure running
•
Java
I'm trying to connect the PHP script that means asynchttpclient to my website The script performs the HTML parsing of another page and converts the result into JSON It works well However, when I try to use Java in JSON form on Android, only the method of opening the flow and returning 'response' will not run on onsuccess and onfailure Who can help me?
private String getStream() { AsyncHttpClient client = new AsyncHttpClient(); client.get("http://jem88.net/eventsAroundYouParser.PHP",new AsyncHttpResponseHandler() { @Override public void onSuccess(String response) { System.out.println("response is here..."+response); Log.d("eventstaker","into response!!"); } @Override public void onFailure(Throwable e,String response) { Log.d("eventstaker","onFailure method is run... :("); } }); return ""; }`
I set up internet and network in the list_ Access permissions Thank you first
Solution
You can override more onfailure methods
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码