I am trying to exit my app from a button in a notification (which uses an intent). I have that sorted out fine. The problem is the way Android seems to store the last-used starting intent.
If I go to the recent apps list and press on my app, it starts then immediately stops the app because it is still using the last intent, which was telling the app to exit.
I know I can permanently prevent the app from appearing in the recent apps list by putting an entry in the manifest but ordinarily I do want it listed there.
So my question is: Can I reset the starting intent, or can I programmatically remove my app from the recent apps list?
If not, does anyone have a solution? I can't post my code right now but all it does is read the app's starting intent in Activity_Create and if it sees the "killapp" intent, it force-stops the app (ExitApplication).
If I go to the recent apps list and press on my app, it starts then immediately stops the app because it is still using the last intent, which was telling the app to exit.
I know I can permanently prevent the app from appearing in the recent apps list by putting an entry in the manifest but ordinarily I do want it listed there.
So my question is: Can I reset the starting intent, or can I programmatically remove my app from the recent apps list?
If not, does anyone have a solution? I can't post my code right now but all it does is read the app's starting intent in Activity_Create and if it sees the "killapp" intent, it force-stops the app (ExitApplication).