title: Passing MainActivity in params
body: <p>I need to start AsyncTask in UI thread, but the Constructor has (MainActivity parentActivity)
  parametr. I don't really understand why it should be implemented and how I must pass it.</p>
  
  <p>Here Eclipse says "Cant resolve MainActivity to a variable." Same for Activity.MainActivity.</p>
  
  <pre><code>new DownloaderTask(MainActivity).execute();`
  </code></pre>
  
  <p>And the constructor.</p>
  
  <pre><code>public DownloaderTask(MainActivity parentActivity) {
      super();
  
      mParentActivity = parentActivity;
      mApplicationContext = parentActivity.getApplicationContext();
  
  }
  </code></pre>