android关闭应用程序
来源:互联网 发布:巴南银针 淘宝 编辑:程序博客网 时间:2024/06/13 04:59
1.杀死自身进程
int pid=android.os.Process.myPid();
android.os.Process.killProcess(pid);
2.
System.exit(0);
3.杀死其他应用进程
ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE);am.killBackgroundProcesses("");
添加权限:
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>
0 0
- android关闭应用程序
- Android完全关闭应用程序
- Android完全关闭应用程序
- 彻底关闭android应用程序
- android关闭整个应用程序
- Android应用程序完全关闭
- 关闭Android应用程序
- android 彻底关闭应用程序
- Android-正常关闭应用程序
- Android 关闭整个应用程序
- Android完全关闭应用程序
- Android完全关闭应用程序
- android关闭应用程序
- android 关闭应用程序
- Android完全关闭应用程序
- Android 完全关闭应用程序
- android--彻底关闭--应用程序
- Android 关闭整个应用程序
- group functions
- POJ2299 Ultra-QuickSort 【树状数组】+【hash】
- java中super的作用
- The Real Meaning of Peace 宁静的真谛
- poj 1068 Parencodings(模拟)
- android关闭应用程序
- 基于DataChannel.js(WebRTC_Experiment)实现的多端点的通信
- 菜鸟学习的开始
- rsync 的核心算法
- <<Oracle Applications DBA 基础(第二期)>>Week 11 exercise
- (转)C++开发BHO(以HelloWorld对话框为例子)
- 线段树 --- 单点更新、求逆序对、离散化
- 使用PHP导入和导出CSV文件
- [LeetCode] Validate Binary Search Tree