When Do Intent Extras Become Null Between Activities?
I'm having problems receiving intent extras between activities. In my MainActivity I start a Gallery activity to chose video files on external SD card: public class MainMenu extend
Solution 1:
What you are doing is to call the MainActivity
again after opening the gallery. Depending on the flags used in your manifest, that might cause that your main activity is not launched a second tim, but that your initial main activity is unpaused and raised to foreground.
If this is the case, due to the activity lifecycle, onCreate(...)
will not be called again, but you can check if the following method is called:
@OverrideprotectedvoidonNewIntent(Intent intent) {
super.onNewIntent(intent);
//TODO: check here if your intent extras arrive and log, then debug
}
Post a Comment for "When Do Intent Extras Become Null Between Activities?"