First of all, my asynchronous works do the perfect job while bringing data to show up on my activity. But when I click to start any other activity, I get the java.lang.NullPointerException
error here:
protected void onPostExecute (JSONObject jsonArray ) {//super.onPostExecute (jsonArray); Error here - & gt; OnTaskComplete.setMyTaskComplete (jsonArray); If (pDialog! = Null) pDialog.dismiss (); / * If (jsonArray! = Null) {arrVer (jsonArray); } * /}
Does anybody know that the cause of the problem can be?
try it ...
protected void onPostExecute (JSONObject jsonArray ) {//super.onPostExecute (jsonArray); If (jsonArray! = Null) {onTaskComplete.setMyTaskComplete (jsonArray); If (pDialog! = Null) pDialog.dismiss (); // rest of your code}}
PS:
Be sure you're getting JSONObject
Or JSONArray
or string
this exception
as the parameter of this function.
No comments:
Post a Comment