2020
09-24
09-24
Android 实现彻底退出自己APP 并杀掉所有相关的进程
彻底杀掉App相关进程的代码publicvoidkillAppProcess(){//注意:不能先杀掉主进程,否则逻辑代码无法继续执行,需先杀掉相关进程最后杀掉主进程ActivityManagermActivityManager=(ActivityManager)CurrentActivity.this.getSystemService(Context.ACTIVITY_SERVICE);List<ActivityManager.RunningAppProcessInfo>mList=mActivityManager.getRunningAppProcesses();for(ActivityManager.RunningAppProcessInforunni...
继续阅读 >