title: How to start an Intent from an AsyncTask
body: <p>I'm trying to start an Activity in my AsyncTask from the doInBackground() method but it doesn't seem to start.</p>
  
  <p>I've passed the Activity of which I call the AsyncTask from using params[0].</p>
  
  <pre><code>    public class StartProcess extends AsyncTask&lt;Main, Void, Main&gt;
  {
      @Override
      protected Main doInBackground(Main... params) { 
  
          return params[0];
      }
      protected void onPostExecute(Main... params) {
          // TODO Auto-generated method stub
          System.out.println("post");
          Intent loc = new Intent(params[0],LocationHandler3.class);
          loc.putExtra("locationType",0);
          loc.putExtra("startEndType",0);
          params[0].startActivity(loc);
      }
  
  
  }
  </code></pre>