PackageManager.GetPackagesHoldingPermissions Method

Definition

Overloads

GetPackagesHoldingPermissions(String[], PackageInfoFlags)

Return a List of all installed packages that are currently holding any of the given permissions.

GetPackagesHoldingPermissions(String[], PackageManager+PackageInfoFlags)

GetPackagesHoldingPermissions(String[], PackageInfoFlags)

Return a List of all installed packages that are currently holding any of the given permissions.

[Android.Runtime.Register("getPackagesHoldingPermissions", "([Ljava/lang/String;I)Ljava/util/List;", "GetGetPackagesHoldingPermissions_arrayLjava_lang_String_IHandler")]
public abstract System.Collections.Generic.IList<Android.Content.PM.PackageInfo> GetPackagesHoldingPermissions (string[] permissions, Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("getPackagesHoldingPermissions", "([Ljava/lang/String;I)Ljava/util/List;", "GetGetPackagesHoldingPermissions_arrayLjava_lang_String_IHandler")>]
abstract member GetPackagesHoldingPermissions : string[] * Android.Content.PM.PackageInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.PackageInfo>

Parameters

permissions
String[]
flags
PackageInfoFlags

Additional option flags to modify the data returned.

Returns

A List of PackageInfo objects, one for each installed package that holds any of the permissions that were provided, containing information about the package. If no installed packages hold any of the permissions, 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 installed packages that are currently holding any of the given permissions.

Use #getPackagesHoldingPermissions(String[], PackageInfoFlags) when long flags are needed.

Java documentation for android.content.pm.PackageManager.getPackagesHoldingPermissions(java.lang.String[], 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

GetPackagesHoldingPermissions(String[], PackageManager+PackageInfoFlags)

[Android.Runtime.Register("getPackagesHoldingPermissions", "([Ljava/lang/String;Landroid/content/pm/PackageManager$PackageInfoFlags;)Ljava/util/List;", "GetGetPackagesHoldingPermissions_arrayLjava_lang_String_Landroid_content_pm_PackageManager_PackageInfoFlags_Handler", ApiSince=33)]
public virtual System.Collections.Generic.IList<Android.Content.PM.PackageInfo> GetPackagesHoldingPermissions (string[] permissions, Android.Content.PM.PackageManager.PackageInfoFlags flags);
[<Android.Runtime.Register("getPackagesHoldingPermissions", "([Ljava/lang/String;Landroid/content/pm/PackageManager$PackageInfoFlags;)Ljava/util/List;", "GetGetPackagesHoldingPermissions_arrayLjava_lang_String_Landroid_content_pm_PackageManager_PackageInfoFlags_Handler", ApiSince=33)>]
abstract member GetPackagesHoldingPermissions : string[] * Android.Content.PM.PackageManager.PackageInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.PackageInfo>
override this.GetPackagesHoldingPermissions : string[] * Android.Content.PM.PackageManager.PackageInfoFlags -> System.Collections.Generic.IList<Android.Content.PM.PackageInfo>

Parameters

permissions
String[]

Returns

Attributes

Applies to