次の方法で共有


PackageManager.GetInstalledPackages Method

Definition

Overloads

GetInstalledPackages(PackageInfoFlags)

Return a List of all packages that are installed for the current user.

GetInstalledPackages(PackageManager+PackageInfoFlags)

GetInstalledPackages(PackageInfoFlags)

Return a List of all packages that are installed for the current user.

[Android.Runtime.Register("getInstalledPackages", "(I)Ljava/util/List;", "GetGetInstalledPackages_IHandler")]
public abstract System.Collections.Generic.IList<Android.Content.PM.PackageInfo> GetInstalledPackages (Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("getInstalledPackages", "(I)Ljava/util/List;", "GetGetInstalledPackages_IHandler")>]
abstract member GetInstalledPackages : Android.Content.PM.PackageInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.PackageInfo>

Parameters

flags
PackageInfoFlags

Additional option flags to modify the data returned.

Returns

A List of PackageInfo objects, one for each installed package, containing information about the package. In the unlikely case there are no installed packages, an empty list is returned. If flag MATCH_UNINSTALLED_PACKAGES is set, the package information is retrieved from the list of uninstalled applications (which includes installed applications as well as applications with data directory i.e. applications which had been deleted with DELETE_KEEP_DATA flag set).

Attributes

Remarks

Return a List of all packages that are installed for the current user.

Use #getInstalledPackages(PackageInfoFlags) when long flags are needed.

Java documentation for android.content.pm.PackageManager.getInstalledPackages(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

GetInstalledPackages(PackageManager+PackageInfoFlags)

[Android.Runtime.Register("getInstalledPackages", "(Landroid/content/pm/PackageManager$PackageInfoFlags;)Ljava/util/List;", "GetGetInstalledPackages_Landroid_content_pm_PackageManager_PackageInfoFlags_Handler", ApiSince=33)]
public virtual System.Collections.Generic.IList<Android.Content.PM.PackageInfo> GetInstalledPackages (Android.Content.PM.PackageManager.PackageInfoFlags flags);
[<Android.Runtime.Register("getInstalledPackages", "(Landroid/content/pm/PackageManager$PackageInfoFlags;)Ljava/util/List;", "GetGetInstalledPackages_Landroid_content_pm_PackageManager_PackageInfoFlags_Handler", ApiSince=33)>]
abstract member GetInstalledPackages : Android.Content.PM.PackageManager.PackageInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.PackageInfo>
override this.GetInstalledPackages : Android.Content.PM.PackageManager.PackageInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.PackageInfo>

Parameters

Returns

Attributes

Applies to