有什么办法杀死与已知的包名的应用程序? [英] Is there any way to kill application with known package name?
本文介绍了有什么办法杀死与已知的包名的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用以下code:
for(int i = 0; i < numOfTasks; i++)
ActivityManager.RunningAppProcessInfo task = tasksP.get(i);
从 task.processName
我收到工艺包名称,例如 com.android.alarmclock
(运行应用程序)
from task.processName
I am getting process package name e.g com.android.alarmclock
(running app)
我要杀死这个应用程序,反正是有做到这一点?
I want to kill this application, is there anyway to do that ??
推荐答案
有是杀一个应用双向
/* Way one */
android.os.Process.killProcess(android.os.Process.myPid())
/* Way Two */
System.exit(0);
这篇关于有什么办法杀死与已知的包名的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文