What I need is to provide an exit confirmation dialog for my mobile app.
The dialog is to appear when users taps the Back
button on their phones. I know two options i.e.
- "Press back again if you really wish to exit" type of message.
- "Do you really wish to exit + Yes/No" dialog.
I am exploring the second variant.
The problem I see primarily concerns the windows store apps.
If I show it and give user time to decide than I have already cancelled the default behavior.
For windows store app it is Windows.Phone.UI.Input.HardwareButtons.BackPressed
i.e. I've set the Windows.Phone.UI.Input.BackPressedEventArgs.Handled
to true.
What do I do if user clicks Yes
i.e. confirms his intent to exit the app?
I've read the Metro App can no longer be programmatically killed and do understand that programmatically closing the windows store app is considered "unacceptable". Does it mean that such an exit confirmation dialog is banned for windows platform?
What about Android? Is it ok there to exit the app programmatically?