title: Android getIntent() returns same intent in onResume() each time. how to clear int field in a bundle?
body: <p>I am working on app that uses getIntent() to read bundled information.  I would like to set one of the bundle fields to null, so that on subsequent resumes a modified intent is received, but I keep getting the same intent back from getIntent().  I notice that after the back key is pressed than a new intent is produced, but not otherwise.</p>
  
  <pre><code> intent.getExtras().getInt("FLAG_FIELD") returns 1
   intent.getExtras().setString("FLAG_FIELD", null);
  </code></pre>
  
  <p>but when the Activity resumes again getInt() still returns a value instead of null. Not sure than how to clear a Int field in a bundle.</p>
  
  <p>Update just tried:</p>
  
  <pre><code>intent.getExtras().putInt("FLAG_FIELD, -1); 
  </code></pre>
  
  <p>This also does not work. Looks like intent from getIntent() cannot be changed.</p>
  
  <p>Update:  onResume() gets called in the debugger 3 times in a row before the activity becomes visible? So even if I set a flag here it seems that its hard to change state because I cannot tell which resume() call is the last one before an actual display.</p>