I have a search screen which can be launched from clicking on a \"name\" field of another screen.
If the user follows this workflow, I add an extra to the Intent\'s Extr
While @Andrew's answer may provide a means for removing a specific Intent extra, sometimes it is necessary to clear ALL of the intent extras and, in this case, you will want to use
Intent.replaceExtras(new Bundle())
Source code of replaceExtras
:
/**
* Completely replace the extras in the Intent with the given Bundle of
* extras.
*
* @param extras The new set of extras in the Intent, or null to erase
* all extras.
*/
public @NonNull Intent replaceExtras(@NonNull Bundle extras) {
mExtras = extras != null ? new Bundle(extras) : null;
return this;
}