title: Android - Pause the for-loop till the AsyncTask Completed Successfully
body: <p>The results object holds N number of JSON array value.<br/>The for-loop runs (initiate) the second array value before the first async task completed.I want to execute and move to the next array value,only after the current one gets finished successfully,If NOT wait for it to complete</p>
  
  <pre><code>if (results.length() &gt; 0) {
      for (int i = 0; i &lt; results.length(); i++) {
          JSONObject object = results
                  .getJSONObject(i);
          FeedDataType item = new FeedDataType(
                  object);
          AsyncTasks performBackgroundTask = new AsyncTasks();
          performBackgroundTask.execute(item);
          DBadapter.add(item);
          Log.e("Aynsc Task",performBackgroundTask.getStatus().toString());
      }
  }
  </code></pre>
  
  <p>Log results shows only <strong>Pending</strong> (or) <strong>Running</strong> but Not <strong>Finished</strong>.<br>
  Give me a solution that doesn't affect the UI.<br>
  And,I don't want to use get() method on Asynctask class.</p>