【问题标题】:Android ajax Query Async API callback not firingAndroid ajax查询异步API回调未触发
【发布时间】:2013-12-18 14:04:17
【问题描述】:

我有这段来自 Android Query Async API 示例的代码,但从未调用过回调。

 public void asyncJson(){          
    String url = "http://www.mysite.com/MyService.asmx/GetJson";

    Map<String, Object> params = new HashMap<String, Object>();
    params.put("100", "Param1");

    aq.ajax(url, params, JSONObject.class, new AjaxCallback<JSONObject>() {

        @Override
        public void callback(String url, JSONObject json, AjaxStatus status) {

            int dummy=0; // breakpoint here....but it never stops the debugger here
            //showResult(json);               
        }
    });

 } // asyncJson    

我在 int dummy=0 上放了一个断点,它永远不会停在那里。 ajax行执行正确,也没有错误。

【问题讨论】:

    标签: android ajax callback


    【解决方案1】:

    更改 params.put("100", "Param1");到 params.put("Param1", "100");回调被调用。

    【讨论】:

      猜你喜欢
      • 2015-05-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-10
      • 2013-07-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多