I know that there were several messages for what I was going to ask, but I can not find the right answer.
From my point of view, if your main activity (let it be called A) launchMode is set to singleTask, and A initiates action B, then pressing the home button will destroy the history stack and restarting the application will bring you back to A, not B.
I have set the startup mode for singleTask because I have a constant notification, and I do not want each instance of the main activity to be displayed every time the user clicks on the notification.
Is there something that I am missing that will allow me to serve both?
So, I ask if there is a way to guarantee that whenever the user wants to start the application from the notification or not, return it to the last (current) action.
If I change startMode to singleTop, it works, but I get multiple instances of the main activity whenever I start it.
thanks
Andreas
kkudi source share