1

i try to implement a way to turn off an app with a button. If i push the button, the app seems to being closed, but if i look which applications a currently running, my app is still active. Here ist my code:

turnOffApp.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            finishAffinity();
            System.exit(0);
        }
    });
  • Does this answer your question? [System.exit(0) does not work for closing application](https://stackoverflow.com/questions/20865792/system-exit0-does-not-work-for-closing-application) – mxmissile Jan 09 '20 at 19:04
  • Hey and thanks for responding! I have tried all the suggested solutions, but none works, the application is still active. –  Jan 11 '20 at 19:12

0 Answers0