title: Android. Can't clear or replace extras
body: <p>I lunch activity from notification.</p>
  
  <pre><code>Intent notificationIntent = new Intent(context, MainActivity.class); 
  notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP );
  notificationIntent.putExtra(GCM_EXTRA_ID, id);
  PendingIntent intent = PendingIntent.getActivity(context, 0, notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT);
  notification.setLatestEventInfo(context, title, message, intent);
  notification.flags |= Notification.FLAG_AUTO_CANCEL;
  notification.defaults |= Notification.DEFAULT_SOUND;
  notificationManager.notify(0, notification); 
  </code></pre>
  
  <p>If activity destroyed, intent creates new activity and call in oncreate activity this code</p>
  
  <pre><code>Bundle extras = getIntent().getExtras();
  
  if(extras != null){
      if(extras.containsKey(GCMIntentService.GCM_EXTRA_ID))
      {
          int id = extras.getInt(GCMIntentService.GCM_EXTRA_ID);
          Toast.makeText(this, "GCM_EXTRA_ID ACTIVITY ON CREATE:" + Integer.toString(id) , Toast.LENGTH_LONG).show();
          dbClassItem = new DBClass(this);
          db =  dbClassItem.getWritableDatabase();
          DBClass.setLocateValue(db, id);
          db.close();
          getIntent().putExtra(GCMIntentService.GCM_EXTRA_ID, 0);
      }
  }
  </code></pre>
  
  <p>If I close activity by back button and start activity again application still see, that intent has extra with key <code>GCMIntentService.GCM_EXTRA_ID</code> <em>(this is a public static string)</em>. </p>
  
  <p>How can I clear or replace this extra for next app start. <code>getIntent().removeExtra()</code>, <code>getIntent().getExtras().clear(),getIntent().putExtra(GCMIntentService.GCM_EXTRA_ID, 0)</code> does not work. What can I do ? Activity has  <code>android:launchMode ="singleTop"</code> key.</p>