2019년 10월 25일 금요일

How to kill the current process in Android?

If you want to kill the current process in Android, please try to use the following code.

public void killProcess(Activity activity) {
    ActivityCompat.finishAffinity(activity);
    System.runFinalizersOnExit(true);
    System.exit(0);
}

댓글 없음:

댓글 쓰기