android编程之得到应用程序信息
来源:互联网 发布:怎样在淘宝上做代销 编辑:程序博客网 时间:2024/04/29 01:20
android系统运行的应用程序,可以通过PackageManager类获得相关信息:
packageManager.getInstalledApplications(0) 这个方法会返回一个list,包含所以程序包括系统程序。
通过for (ApplicationInfo app : listAppcations)遍历所有信息
通过app.flag标示可以判断当前程序是系统程序还是第三方程序,还是手机卡上的程序:
(app.flags & ApplicationInfo.FLAG_SYSTEM) != 0 表示系统程序
(app.flags & ApplicationInfo.FLAG_SYSTEM) <= 0 表示第三方应用程序
(app.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0 表示系统程序被手动更新后,也成为第三方应用程序
((app.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0 表示安装在SD卡上的应用程序
程序的相关信息:
packageManager.getApplicationLabel(app) 得到当前程序的名字
packageManager.getApplicationIcon(app); 得到当前程序的ICON
app.uid 得到当前程序的UID
app.packageName 得到当期程序的包名
- android编程之得到应用程序信息
- android编程之得到应用程序信息
- android编程之得到应用程序信息
- Android得到已安装的应用程序信息!
- Android得到已安装的应用程序信息!
- 由packagename得到应用程序信息
- android中得到本应用程序的相关包信息和手机中安装的应用程序的相关信息
- android GPS JAVA应用程序编程-------获得经纬度,卫星信息等
- android GPS JAVA应用程序编程-------获得经纬度,卫星信息等
- android GPS JAVA应用程序编程-------获得经纬度,卫星信息等
- 得到android的系统信息
- 获取Android应用程序信息
- android 检测应用程序信息
- 得到系统中存在桌面图标的应用程序的相关信息
- [转载]android得到手机卡相关信息
- 代码得到手机硬件信息--android
- 得到android程序和手机终端信息
- android得到手机卡的相关信息
- Java 中File 文件类
- 一个非常不错的数据库连接
- 第十三周任务三
- oracle dual表
- Zend Framework教程-Zend_Helpers-动作助手-Url
- android编程之得到应用程序信息
- struts1 从action跳转到另一个action的方法
- 关于网址URL是否区分大小写的问题
- Vi/Vim查找替换使用方法
- Zend Framework教程-Zend_Helpers-动作助手-创建自己的动作助手
- ADO.NET技术
- java心得---泛型
- 动软第三方控件的使用
- 基于stringstream的类型转换封装