How to return JSONObject from doInBackground() method to onPostExecute() method on AsyncTask?

后端 未结 4 1109
名媛妹妹
名媛妹妹 2020-12-17 02:50

In Android app i want to return JSONObject from doInBackground() method to onPostExecute() method.
Here is the code:

private cl         


        
4条回答
  •  情歌与酒
    2020-12-17 03:37

    OK, Now look at this carefully,

    private class AddAsyncTask extends AsyncTask
    

    In your AsyncTask third Parameter is String So change it to JSONObject .

    like,

    private class AddAsyncTask extends AsyncTask 
    

提交回复
热议问题