In the application I made, I put:
if(Globals.isExit){ finish(); }
In every onResume () method in every action.
Globals is a class declared as an .xml manifest. The Global class has a logical name: exit.
In the parameters menu of all actions, enable the exit parameter, which sets the value of Globals.exit to true and calls finish ()
Then all the actions that remain incomplete are completed.
Not sure if you will need to use the intention to clean the back or complete it for you. Sorry if I'm wrong about this bit.
Sorry for the bad typing, I'm on the phone.
source share