I have activity. The startup mode is singleTask, and I implement onNewIntent. When I send the intention to start this action while the activity is open (with the NEW_TASK and RESET_TASK_IF_NEEDED flags), the screen blinks before showing me the same activity.
Why can this happen? I thought that singleTask should be enough to guarantee that new intentions will be passed onNewIntent, and not a system that will launch a new task or something for my activity. The blinking disappears when I do one of the following:
- change the startup mode to singleTop;
- add the Intent.FLAG_ACTIVITY_CLEAR_TOP flag to the launch intent.
I am curious to know what is happening and what, if anything, I can do to overcome the flashing (I would prefer not to change the launch mode or the launch launch flags, if at all possible). Basically, are there any good reasons why this should not work?
Please note that I really get onNewIntent even if the screen is blinking.
source
share