📅  最后修改于: 2022-03-11 14:53:33.557000             🧑  作者: Mango
// add this permission to AndroidManifest.xml
//and use this code to kill the process
val am = getSystemService(Activity.ACTIVITY_SERVICE) as ActivityManager
am.killBackgroundProcesses(packageName)