I am working on an application that uses getIntent () to read related information. I would like to set one of the package fields to null, so that subsequent renewals will get the changed intention, but I get the same intention back from getIntent (). I noticed that after pressing the back key, what creates a new intention, but not otherwise.
intent.getExtras().getInt("FLAG_FIELD") returns 1 intent.getExtras().setString("FLAG_FIELD", null);
but when activity resumes again, getInt () will still return a value instead of zero. Not sure how to clear Int field in package.
The update just tried:
intent.getExtras().putInt("FLAG_FIELD, -1);
This also does not work. It seems that the intent from getIntent () cannot be changed.
Update: onResume () is called in the debugger 3 times in a row before the action becomes visible? Therefore, even if I set the flag here, it seems that it is difficult to change it, because I cannot determine which resume () call is the last before the actual display.
android
Android Developer
source share