fffy2366 / android-query

Automatically exported from code.google.com/p/android-query
0 stars 0 forks source link

setTimeOut not work #158

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
  aq = new AQuery(this);    
  System.out.println("setTimeout");

  AjaxCallback<JSONArray> cb = new AjaxCallback<JSONArray>();
//  AjaxCallback.setTimeout(5000); 
//  cb.setTimeout(5000); 
  cb.url("url_to_api").type(JSONArray.class).weakHandler(this, "jsonCallback").timeout(5000);     

 aq.ajax(cb);

public void jsonCallback(String url, final JSONArray json, AjaxStatus status)
{

    if(json != null) {                  
        parseJSON(json);
    } else {

        System.out.println("Error");
    }
 }

Everytime show timeout after 20 sec.

Original issue reported on code.google.com by mustafayev.mexti on 17 Oct 2013 at 12:10