I have an application where I've 5 Activity. One Menu Activity and another 4 child Activity attached to menu screen. So i can select any Activity and then cane back to menu. Suppose I move around like this
Menu -> Activity1 -> Menu -> Activity3 -> Activity2 -> Menu
and now I press Home/Back Button and I want that my app will show me a alert dialog for exit confirmation , If I press yes then kill all Activity and show the home screen.
I've tried those finish() , System.exit(0) but no luck there . finish() and System.exit(0) both finishes the current activity not all of them. Please Show me a way.