public static String getProcessName(Context context) {
来源:互联网 发布:hadoop apache spark 编辑:程序博客网 时间:2024/05/01 22:24
public static String getProcessName(Context context) {
ActivityManager actMgr = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
List<RunningAppProcessInfo> appList = actMgr.getRunningAppProcesses();
for (RunningAppProcessInfo info : appList) {
if (info.pid == android.os.Process.myPid()) {
return info.processName;
}
}
return "unknown";
}
ActivityManager actMgr = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
List<RunningAppProcessInfo> appList = actMgr.getRunningAppProcesses();
for (RunningAppProcessInfo info : appList) {
if (info.pid == android.os.Process.myPid()) {
return info.processName;
}
}
return "unknown";
}
- public static String getProcessName(Context context) {
- Android Function: public static boolean isCmwap(Context context)
- Context
- Context
- Context
- context
- Context
- context
- Context
- Context
- Context
- Context
- Context
- Context
- Context
- context
- context
- Context
- ssh-keygen
- java面试
- distinct 和 group by 使用对比
- C# Winform控件贴透明png图片遇到的问题
- Java实现Socket发送和接收文件的代码(java 粘包个人联系)
- public static String getProcessName(Context context) {
- 怎样编写一个程序,把一个有序整数数组放到二叉树中
- HDU 3904 A tree game(树的删边游戏,树形图博弈)
- 客户区和非客户区指的什么?窗口客户区和视图客户区的区别!
- 最大互信息准则
- ASP页面调用Silverlight控件及传参
- VC 实现屏幕保护
- windows2003 IIS6 发布 Silverlight + Ria Services
- 用内存映射的方式打开大文件