0

If I press the button ,kill app but my app suspend condition. I uses

      public void onClick(View v){     
            moveTaskToBack(true);
            finish();
            android.os.Process.killProcess(android.os.Process.myPid());
        }
    });
}

but app is suspend onResume .

Surely , how can I kill app?

조현욱
  • 31
  • 7
  • You shouldn't need to do this. In fact, this can get your process marked bad by the system and prevent your app components from running. – Karakuri Feb 03 '16 at 01:23

1 Answers1

0

Use this:

getActivity().finish();
System.exit(0);

Or this:

finish();
josedlujan
  • 5,357
  • 2
  • 27
  • 49