I have a problem: I can not kill the application, I have tried the finish(); and ActivityManager etc. but they have not worked (application starts up again).
I have a problem: I can not kill the application, I have tried the
Share
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.
This is not recommended in Android it’s against Android usability patterns. The main thing is that you don’t need to stop/kill/close your app trough a single line of code
System.exit(0)as @parag suggested to you. Doing so is an indication you missed some important point in Android development. If for some bizarre reason you have to do it, you need tofinish()allActivities, stop allServicesand disable allBroadcastReceiversdeclared inAndroidManifest.xml