I was wondering how you would have a warning appear when the user tries to exit the app? So this includes if they are pressing the back button too. What would be the best way to do this?
I have seen this done on some mainstream games.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you may add
onBackPressed()in yourApplicationsubclass to intercept the back button: