博客来源:
工作中遇到要结束第三方进程的问题,于是进行了了解和结束第三方进程的方法
ActivityManager am = (ActivityManager)mContext.getSystemService(Context.ACTIVITY_SERVICE);
am.killBackgroundProcesses(packageName);
要记得添加权限
<uses-permission android:name="android.permission.FORCE_STOP_PACKAGES" />