您的位置:首页 > 移动开发 > Android开发

getInstalledPackages的参数详解

2016-07-04 17:54 411 查看
在项目中使用要用到获取系统应用的功能,发现packageManager类中的getInstalledPackages可以传很多Flag,于是百毒了一下,没有发现详细介绍这些参数(大家大都直接传0进去),于是我翻墙去谷歌官网看了一波,话说android官网已经变炫不少,差点没找到api。

废话少说,直接上资料:本人英文就4级,翻译水平有限,见谅。

1,GET_ACTIVITIES:return information about activities in the package in activities.

返回该activities所在的包的acitivities信息。

2,GET_GIDS:return the group ids that are associated with an application. This applies for any API returning a PackageInfo class, either directly or nested inside of another.

返回与该应用有关的所有id,无论直接有关或是嵌套关联。

3,GET_CONFIGURATIONS:return information about hardware preferences in PackageInfo.configPreferences, and requested features in reqFeatures and featureGroups.

返回信息硬件PackageInfo偏好。在reqFeatures和featureGroups configPreferences请求的功能。

4,GET_INSTRUMENTATION : return information about instrumentation in the package in instrumentation.

返回测试工具所在包的测试工具信息

5,GET_PERMISSIONS:return information about permissions in the package in permissions.

返回所在包权限的信息

6,GET_PROVIDERS, GET_RECEIVERS, GET_SERVICES一看名字便知是获得本包内四大组件其他仨的信息

7, GET_UNINSTALLED_PACKAGES:Flag parameter to retrieve some information about all applications (even uninstalled ones) which have data directories.

用来获得所有(包括删除的)有包数据目录的应用信息。

8,GET_SIGNATURES:return information about the signatures included in the package.

返回的信息签名包含在包中。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android api