title: How to get the intent extras if the activity is `singleTask`?
body: <p>I have an activity, which is a singleTask:</p>
  
  <pre><code>public class MyActivity extends Activity {
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          System.out.printf("### MyAcitvity.onCreate: " + getIntent().getExtras());
      }
  
      @Override
      protected void onResume() {
          super.onResume();
          System.out.println("### MyActivity.onResume: " + getIntent().getExtras());
      }
  
      public void toNext(View v) {
          startActivity(new Intent(this, AaaActivity.class));
      }
  }
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>&lt;activity android:name=".MyActivity" android:launchMode="singleTask" /&gt;
  </code></pre>
  
  <p>No it has been started, and it started another activity called <code>AaaActivity</code>.</p>
  
  <pre><code>public class AaaActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.aaa);
      }
  
      public void jumpToFirst(View v) {
          Intent intent = new Intent(this, MyActivity.class);
          intent.putExtra("aaa","bbb");
          startActivity(intent);
      }
  
  }
  </code></pre>
  
  <p>In the later one, there is a button which will trigger the <code>jumpToFirst</code> method to start the first one, and pass a data pair <code>aaa=bbb</code>. Since <code>MyActivity</code> is <code>singleTask</code>, it won't create a new one, instead, it will just back to the existing <code>MyActivity</code> instance.</p>
  
  <p>My question is: how to get the passing extra data from <code>AaaActivity</code> in <code>MyActivity</code>?</p>
  
  <p>You can see I have logged <code>onCreate</code> and <code>onResume</code> methods, but it prints null extra data.</p>
  
  <pre><code>11-16 08:44:17.833: INFO/System.out(5171): ### MyAcitvity.onCreate: null
  11-16 08:44:19.417: INFO/System.out(5171): ### MyActivity.onResume: null
  11-16 08:44:26.041: INFO/System.out(5171): ### MyActivity.onResume: null
  11-16 08:44:28.897: INFO/System.out(5171): ### MyActivity.onResume: null
  </code></pre>