Hi guys
I wanted to ask : I have a first activity that opens the second activity in the Activity menu. I press exit in Activity 2 and would like you to also close the Activity 1. How to do this?
Hi guys
I wanted to ask : I have a first activity that opens the second activity in the Activity menu. I press exit in Activity 2 and would like you to also close the Activity 1. How to do this?
When you start an Activity B from Activity A, use startActivityForResult(...)
. When you want to close the entire app, you can do something like this:
setResult(RESULT_CLOSE_ALL);
finish();
You can check How to kill an application with all its activities? for detailed description