I have a notification that notifies that a long operation has succeeded and offers the user to do something after that.
Leaving the notification aside and opening the app, makes the app apear in the recents - even when the back is pressed and the activity stack is left empty.
The problem is that when the user clicks on the notification, the notification intent is then registers in the recents - instead of the app's main activity. Clicking on the recents over and over again does the notification intent action instead of popping up the app.
How can I have the app stay in recents instead of the last notification intent?
Notes:
- When the app's activity stack is not empty, everything works perfect!
FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
is not acceptable because it removes the app altogether from the recents instead of just the notification intent.