title: Start new thread within Async Task
body: <p>Is it possible start a new thread within an Async task?
  Something like this:</p>
  
  <pre><code>public class FirstActivity extends Activity {
  
  protected ProgressBar progBar;
  protected Intent intent;
  
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      progBar = (ProgressBar)findViewById(R.id.start_progressBar);
      progBar.setProgress(0);
      new StartingApp().execute();
  }
  
  protected class StartingApp extends AsyncTask&lt;Void, Integer, Void&gt; {
  
      int myProgress;
  
      @Override
      protected void onPreExecute() {
          myProgress = 0;
      }
  
      @Override
      protected Void doInBackground(Void... params) {
  
          while(myProgress&lt;50){
              myProgress++;
              publishProgress(myProgress);
                  SystemClock.sleep(10);
              }
  
          MyRunnableClass mrc = new MyRunnableClass();
          mrc.run();
  
          return null;    
      }
  
      @Override
      protected void onPostExecute(Void result){
  
          intent = new Intent(FirstActivity.this, SecondActivity.class);
          startActivity(intent);
      }
  
      @Override
      protected void onProgressUpdate(Integer... values) {
  
          progBar.setProgress(values[0]);
      }
  }
  }
  </code></pre>
  
  <p>MyRunnableClass is a class which implements Runnable.
  I want something like this because in the first activity I want to show a progress bar while the application is initializing (fill data structures, starting threads).</p>
  
  <p>Another question I have is: should I use the run() or start() method?</p>
  
  <p>Thanks in advance!</p>