PackageManager.GetPackagesHoldingPermissions(String[], PackageInfoFlags) Method

Definition

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

IList<PackageInfo>

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

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