title: Intent set by NotificationManager is not reflected in activity's onResume()
body: <p>I have a broadcast receiver that, upon receiving something, will create a pending intent, package it with some data, and use it to create a notification with NotificationManager.  The activity that is specified in the pending intent, when NotificationManager resumes the activity, always reads out the original pending intent's data -- it never reads out any new data when set by subsequent onReceive()'s from the broadcast receiver.  Here's a snippet from the broadcast receiver:</p>
  
  <pre><code>public void onReceive( Context context, Intent intent ) {
      String action = intent.getAction();
  
      if( action.equals( "someaction" ) ) {
          long now = System.currentTimeMillis();
          int icon = R.drawable.icon;
          CharSequence tickerText = context.getString( R.string.tickerText );
          CharSequence contentTitle = context.getString( R.string.contentTitle );
          CharSequence contentText = context.getString( R.string.contentText );
          Intent notificationIntent = new Intent( context, MyActivity.class );
  
          Log.d( TAG, "Creating notification with data = " + intent.getStringExtra( "somestring" ) );
          notificationIntent.putExtra( "somestring", intent.getStringExtra( "somestring" ) );
          notificationIntent.addFlags( Intent.FLAG_ACTIVITY_SINGLE_TOP );
          notificationIntent.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
  
          PendingIntent contentIntent = PendingIntent.getActivity( context, 0, notificationIntent, 0 );
          Notification notification = new Notification( icon, tickerText, now );
          NotificationManager notificationmgr = (NotificationManager)context.getSystemService( Context.NOTIFICATION_SERVICE );
  
          notification.flags |= Notification.FLAG_AUTO_CANCEL |
                                Notification.DEFAULT_SOUND |
                                Notification.DEFAULT_VIBRATE;
          notification.setLatestEventInfo( context, contentTitle, contentText, contentIntent );
          notificationmgr.cancelAll();
          notificationmgr.notify( 0, notification );
      }
  }
  </code></pre>
  
  <p>and here's that of the activity:</p>
  
  <pre><code>protected void onStart() {
      super.onStart();
  
      Intent intent = getIntent();
      String somestring = intent.getStringExtra( "somestring" );
  
      Log.d( TAG, "onStart(), somestring = " + somestring );
  }
  
  protected void onResume() {
      super.onResume();
  
      Intent intent = getIntent();
      String somestring = intent.getStringExtra( "somestring" );
  
      Log.d( TAG, "onResume(), somestring = " + somestring );
  }
  
  protected void onNewIntent( Intent intent ) {
      Log.d( TAG, "onNewIntent(), intent = " + intent );
      super.onNewIntent( intent );
      setIntent( intent );
  }
  </code></pre>
  
  <p>So here's the scenario:
  From the home screen, my receiver receives some intent with, say, <em>somestring</em> set to "hello world".  The notification bar shows the notification, I slide down the notification bar, and tap on the notification to launch (create or resume) the activity.  The activity reads out "hello world" correctly.  I leave the activity in the foreground or background it with the home key.  The second time around my broadcast receiver receives, say, "hello again" as <em>somestring</em>.  It again creates the notification, this time with "hello again", except when resuming the activity via the notification, I see in the debug that <em>neither</em> getIntent() nor onNewIntent() reflects the updated value of <em>somestring</em> (i.e. "hello again").  That is, it's still holding onto the old value of "hello world".</p>
  
  <p>Any ideas?  I can't seem to find a way to force an update of the intent's data.  Any help is appreciated; thanks in advance.</p>