title: How to return JSONObject from doInBackground() method to onPostExecute() method on AsyncTask?
body: <p>In Android app i want to return JSONObject from <code>doInBackground()</code> method to <code>onPostExecute()</code> method.<br>
  Here is the code:</p>
  
  <pre><code>private class AddAsyncTask extends AsyncTask&lt;String, Void, String&gt;
       {
           JSONObject jsonObjRecv;
           String result;
  
      @Override
      protected JSONObject doInBackground(JSONObject... params) {
          AssetObj assetObj = new AssetObj();
          assetObj.setAssetName(txtname.getText().toString());
          assetObj.setMobileNo(txtmobile.getText().toString());
          assetObj.setOwnerId(myApp.getOwnerId());
          assetObj.setStartTime(startTime.getText().toString());
          assetObj.setEndTime(endTime.getText().toString());
          assetObj.setInterval(interval.getText().toString());
          JSONObject jsonObjRecv = SyncService.AddNewAssetRequest(assetObj);
          return jsonObjRecv;
       }
       protected void onPostExecute(JSONObject obj){
                      if(obj != null)
                      {
                          //do something
                      }
  </code></pre>
  
  <p>I have try this code i got error. Is it possible to return JSONObject from <code>doInBackground()</code> method to <code>onPostExecute()</code> method? </p>