
What we will do ?
-> We will use the default hello world application, if the back button is pressed then there will be a dialog box displayed whether to close the application.
What we will need ?
Dialog Box
Changes in MainActivity.java
Step 1 : Create a new Application. Click on File->New->Android Application Project.
Step 2 : Give a name to your application (ExitPrompt) and package name as (com.mia.exitprompt)....