I have used the code from here in my app, when I click on 'Cancel' option ,the app just minimizes ,when I long press and hold Home button and select the app.It shows the same screen not the splashscreen or the usual way the app starts - So I am assuming it just takes me to home screen. I am looking for a way I can close the main activity completely.
I have tried the following methods and it crashed every time:
finish();
mainactivity.class.finish();
- opening an intent which has
systemexit()
setresult()
in the another activity.