Android Firebase Push notification restarts app when clicked

The launchMode attribute of the activity affects how the activity is launched.


singleTop, singleTask, or singleInstance should be used to prevent the notification intent from creating a new activity instance.

The flag FLAG_ACTIVITY_NEW_TASK doesn’t influence a new activity being created, but makes the launched activity the root of a new task.



Hope this helps.

Leave a Comment