Well robin hood,
my understanding to your code is that, when user press Exit button it should leave app and when you restart app it should resume from previous activity where application left.
Actually it is same behavior when we press Home button. So you just need to create event home button pressed on exit click.
=======================================
Ok, I don't know following solution is good but. If you want to terminate entire app and resume from home activity. You can put launchMode to sigleinstance in menifeast file for other activities.
or
You can set a static flag when exit button pressed recursively exit the activities.