title: Android Call more than one Web services in AsyncTask
body: <p>I am working on <code>AsynTask</code>, single url call from <code>AsynTask</code> fine but i want to call two web services one after other in <code>AsyncTask</code>, can you please send some code or idea.</p>
  
  <p>My code:</p>
  
  <pre><code>public class GetInstructionItems extends AsyncTask&lt;String, Void, Boolean&gt; {
  
      public ProgressDialog myProgressDialog = null;
      private Boolean authenticationResult = false;
      private String LOG = SurgicalHistoryAsynTask.class.getName(); 
      private String responseString = "getInstructionItemsResult";
      JSONObject totalResult;
  
      protected Boolean doInBackground(String... params) 
      {
          return getRespose(params[0]);
      }
  
      protected void onPostExecute(Boolean result) {
  
          myProgressDialog.dismiss();
          if (result) 
          {
              Log.d(LOG, "Response ::result "+result);
  
          }else{
  
              showAlertMsg(getString(R.string.response_fail));
          }
      }
      protected void onPreExecute() {
  
          if (!authenticationResult) {
              myProgressDialog = new ProgressDialog(getActivity());
              myProgressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
              myProgressDialog.setMessage("loading...");
              myProgressDialog.setCancelable(false);
              myProgressDialog.setProgress(100);
              myProgressDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
              myProgressDialog.show();
          }
      }
  
      private boolean getRespose(String inputUrl){
  
  
          return true;
      }
  }
  </code></pre>