Reputation: 1028
The scenario is like this. While navigating the application, the user receives a notification. By clicking the notification, the application starts the specific activity that the notification is about.
The problem is, when exiting the application by pressing backspace until the launcher activity, and the one more time to exit, the application, instead of exiting, return to the activity that the user was when clicking the notification.
How can i prevent this ? I tried implementing:
android:launchMode="singleTop"
but with no results. Thank you.
Upvotes: 1
Views: 38
Reputation: 4117
use this flag
android:launchMode= "singleInstance"
and to remove animation use this
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
Upvotes: 1