PackageManager.GetInstalledApplications 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| GetInstalledApplications(PackageManager+ApplicationInfoFlags) |
请参阅 getInstalledApplications(int) |
| GetInstalledApplications(PackageInfoFlags) |
返回为当前用户安装的所有应用程序包的列表。 |
GetInstalledApplications(PackageManager+ApplicationInfoFlags)
请参阅 getInstalledApplications(int)
[Android.Runtime.Register("getInstalledApplications", "(Landroid/content/pm/PackageManager$ApplicationInfoFlags;)Ljava/util/List;", "GetGetInstalledApplications_Landroid_content_pm_PackageManager_ApplicationInfoFlags_Handler", ApiSince=33)]
public virtual System.Collections.Generic.IList<Android.Content.PM.ApplicationInfo> GetInstalledApplications(Android.Content.PM.PackageManager.ApplicationInfoFlags flags);
[<Android.Runtime.Register("getInstalledApplications", "(Landroid/content/pm/PackageManager$ApplicationInfoFlags;)Ljava/util/List;", "GetGetInstalledApplications_Landroid_content_pm_PackageManager_ApplicationInfoFlags_Handler", ApiSince=33)>]
abstract member GetInstalledApplications : Android.Content.PM.PackageManager.ApplicationInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.ApplicationInfo>
override this.GetInstalledApplications : Android.Content.PM.PackageManager.ApplicationInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.ApplicationInfo>
参数
控制匹配和返回详细信息的应用程序查询标志包装器。
返回
查询标志和调用方可见性规则包含的应用程序记录。
- 特性
注解
请参阅 getInstalledApplications(int)
Android 参考。android.content.pm.PackageManager.getInstalledApplications
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
GetInstalledApplications(PackageInfoFlags)
返回为当前用户安装的所有应用程序包的列表。
[Android.Runtime.Register("getInstalledApplications", "(I)Ljava/util/List;", "GetGetInstalledApplications_IHandler")]
public abstract System.Collections.Generic.IList<Android.Content.PM.ApplicationInfo> GetInstalledApplications(Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("getInstalledApplications", "(I)Ljava/util/List;", "GetGetInstalledApplications_IHandler")>]
abstract member GetInstalledApplications : Android.Content.PM.PackageInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.ApplicationInfo>
参数
- flags
- PackageInfoFlags
用于修改返回的数据的其他选项标志。
返回
ApplicationInfo 对象列表,每个已安装的应用程序对应一个。 在不太可能的情况下,没有已安装的包,将返回空列表。 如果设置了标志 MATCH_UNINSTALLED_PACKAGES ,则会从卸载的应用程序列表中检索应用程序信息(包括已安装的应用程序以及具有数据目录的应用程序,即使用标志集删除 DELETE_KEEP_DATA 的应用程序)。
- 特性
注解
返回为当前用户安装的所有应用程序包的列表。 如果设置了标志GET_UNINSTALLED_PACKAGES,将返回包含已删除 DELETE_KEEP_DATA 的所有应用程序的列表(包含数据目录的部分安装的应用)。
需要长标志时使用 #getInstalledApplications(ApplicationInfoFlags) 。
Java文档android.content.pm.PackageManager.getInstalledApplications(int)。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。