android - onSuccess(int, Header[], JSONObject) was not overriden, but callback was received -
i using android-async-http, , override onsuccess
, onfailure
method, got error: onsuccess(int, header[], jsonobject) not overriden, callback received
.
cz.msebera.android.httpclient.client.httpresponseexception: not found
i wonder truely override method. got log:onsuccess jsonobject:{"error":null,"success":false}
public static void querysecuritycode(string username) { requestparams params = new requestparams(); params.put("username", username); vstarrestclient.getclient().setenableredirects(true); vstarrestclient.post(get_security_code_url, params, new jsonhttpresponsehandler(){ @override public void onsuccess(int statuscode, header[] headers, jsonobject response) { super.onsuccess(statuscode, headers, response); log.i("ws", "---->>onsuccess jsonobject:" + response); } @override public void onsuccess(int statuscode, header[] headers, jsonarray response) { super.onsuccess(statuscode, headers, response); log.i("ws", "---->>onsuccess jsonarray"); } @override public void onsuccess(int statuscode, header[] headers, string responsestring) { super.onsuccess(statuscode, headers, responsestring); log.i("ws", "---->>onsuccess responsestring"); } @override public void onfailure(int statuscode, header[] headers, string responsestring, throwable throwable) { super.onfailure(statuscode, headers, responsestring, throwable); log.i("ws", "---->>onfailure:" + throwable.tostring()); } @override public void onfailure(int statuscode, header[] headers, throwable throwable, jsonobject errorresponse) { super.onfailure(statuscode, headers, throwable, errorresponse); log.i("ws", "---->>onfailure" + throwable.tostring()); } @override public void onfailure(int statuscode, header[] headers, throwable throwable, jsonarray errorresponse) { super.onfailure(statuscode, headers, throwable, errorresponse); log.i("ws", "---->>onfailure" + throwable.tostring()); } } ); }
you shouldn't call super.onfailure
, super.onsuccess
, warning comes super methods when you're not overriding them.
Comments
Post a Comment