title: Intent from notification does not have extras
body: <p>This seem to be a common problem and I went through all the related questions I could find already:
  <a href="https://stackoverflow.com/questions/5628382/activity-isnt-picking-up-new-intent">Activity isn&#39;t picking up new intent</a>, <a href="https://stackoverflow.com/questions/10456655/why-extra-data-integer-is-not-sent-in-android-notification-intent">Why extra data (integer) is not sent in android notification intent?</a>, <a href="https://stackoverflow.com/questions/7370324/notification-passes-old-intent-extras/9330144">Notification passes old Intent Extras</a>, <a href="https://stackoverflow.com/questions/7098893/cant-put-extras-for-an-intent-in-notification">Can&#39;t put extras for an intent in notification</a>, <a href="https://stackoverflow.com/questions/3009059/android-pending-intent-notification-problem">android pending intent notification problem</a>; but still cannot figure this out.</p>
  
  <p>Problem is the same. I set a notification with a PendingIntent carrying some extra information and I don't get it on the other side.</p>
  
  <p>Here is the code for generating the notification:</p>
  
  <pre><code>Notification notification = new Notification(R.drawable.icon, getResources().getString(R.string.notification_ticker), System.currentTimeMillis());
  notification.flags = Notification.FLAG_AUTO_CANCEL | Notification.FLAG_ONLY_ALERT_ONCE;
  
  Intent start_test = new Intent(this, MyActivity.class);
  start_test.putExtra("start_test", true);
  start_test.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  
  PendingIntent pi = PendingIntent.getActivity(this, (int) System.currentTimeMillis(), start_test, PendingIntent.FLAG_CANCEL_CURRENT);
  notification.setLatestEventInfo(this, getResources().getString(R.string.notification_title), getResources().getString(R.string.notification_content, expired), pi);
  nm.notify(NOTIFICATION_ID, notification);
  </code></pre>
  
  <p>And on the other side:</p>
  
  <pre><code>boolean start_test=getIntent().getBooleanExtra("start_test", false);
  </code></pre>
  
  <p>The bundle is actually not there (getExtras() returns null).</p>
  
  <p>I tried the different flags for <code>PendingIntent.getActivity</code> (<code>FLAG_UPDATE_CURRENT</code>, <code>FLAG_CANCEL_CURRENT</code>, <code>FLAG_ONE_SHOT</code>), none of those helped.</p>
  
  <p>As shown in the code, I use getCurrentMillis to make sure the requestID changes....</p>
  
  <p>Also found that in MyActivity, <code>onCreate</code> and <code>onNewIntent</code> are not getting called. only <code>onResume</code> is. Even though the <code>FLAG_ACTIVITY_NEW_TASK</code> is set... ?</p>
  
  <p>Am I missing something very simple ?</p>