getInstalledApplications VS getInstalledPackages [英] getInstalledApplications vs getInstalledPackages

查看:2659
本文介绍了getInstalledApplications VS getInstalledPackages的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是什么getInstalledApplications和getInstalledPackages之间的区别?该文件没有说太多。

May I know what the differences between getInstalledApplications and getInstalledPackages? The documentation doesn't say much.

感谢。

推荐答案

  • <一个href="http://developer.android.com/reference/android/content/pm/PackageManager.html#getInstalledApplications(int)"相对=nofollow> PackageManager.getInstalledApplications(INT标志)将为您提供有关AndroidManifest的应用程序标签的信息,只是它。忘掉活动,接收器,服务也不管了。
  • <一个href="http://developer.android.com/reference/android/content/pm/PackageManager.html#getInstalledPackages(int)"相对=nofollow> PackageManager.getInstalledPackages(INT标志),在另一方面,将为您提供有关信息的所有 AndroidManifest的元素,如申报的活动,服务,接收器,荟萃数据

  • PackageManager.getInstalledApplications(int flags) will provide you information regarding the AndroidManifest's Application tag, and just about it. Forget about activities, receivers, services and go on.
  • PackageManager.getInstalledPackages(int flags), on the other hand, will provide you information regarding all AndroidManifest's elements, such as declared activities, services, receivers, meta-data
  • 这两种方法都将提供有关信息的任何应用程序,无论他们或他们没有宣布一些活动的 android.intent.category.LAUNCHER 意图类别。

    Both methods will provide info regarding whatever application, regardless they have or they have not declared an android.intent.category.LAUNCHER intent category in some activity.

    在此外,这两种方法将检索一个PackageInfo / ApplicationInfo每APK,或者是更具体的,用于包名称

    In addition, both methods will retrieve one PackageInfo/ApplicationInfo per APK, or being more specific, for package name.

    这篇关于getInstalledApplications VS getInstalledPackages的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆