title: Returning data from AsyncTask without blocking UI
body: <p>I have a conceptual problem related to <code>AsyncTask</code> class. We use <code>AsyncTask</code> so that the main UI is not blocked. 
  But suppose, I want to retrieve some data from the device's memory, and I use AsyncTask class for this. The relevant line of the code will be as follows (assuming the data type returned is String):</p>
  
  <pre><code>  //code
      String data = new ExtendedAsyncTask().execute(param1, param2).get();
    //use this returned value.
  </code></pre>
  
  <p>Won't the above line block the UI, defeating the purpose of using the <code>AsyncTask</code> ? If yes, then how do I get the relevant data without blocking UI ? I would like to add that the next line of code will need this data to perform some task, and hence depends on the returned value.</p>
  
  <p>Thanks</p>