title: Android Volley and the usage of Tasks or Threads in the response
body: <p>in my App i do different requests to get the HTML code of a website. After that, the App parses the HTML, maybe another request will performed and parsed. At the end a ListView is filled with the parsed data.</p>
  
  <p>Now i read that Volley runs all code in the onResponse method on the UI Thread. So maybe it is better to do the parsing in a new thread. I implemented it as follows.</p>
  
  <pre><code>new Thread(new HTMLSiteParsingTask(response)).start();
  
  class HTMLSiteParsingTask implements Runnable {
    String mResponse;
    HTMLSiteParsingTask(String response) {
      mResponse = response;
    }
    public void run() {
    //do something...
    callerActivity.addData(dataHashMap);
    }
  }
  </code></pre>
  
  <p>At the end of the processing i call a method of the MainActivity to add the data to the Listview "callerActivity.addData(dataHashMap);". This Method does the following:</p>
  
  <pre><code>runOnUiThread(new AddItemsTask(ItemList));
  </code></pre>
  
  <p>Is there a difference between AsyncTask and Thread so that i should use one of them? Or doesn't matter? Is there maybe a better way to do that stuff?</p>
  
  <p>Thank you for your answers</p>