本文介绍了getInstalledApplications VS getInstalledPackages的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是什么getInstalledApplications和getInstalledPackages之间的区别?该文件没有说太多。
May I know what the differences between getInstalledApplications and getInstalledPackages? The documentation doesn't say much.
感谢。
推荐答案
- PackageManager.getInstalledApplications(INT标志)将为您提供有关AndroidManifest的
应用程序
标签的信息,只是它。忘掉活动,接收器,服务也不管了。 - 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!