Partager via


MockPackageManager.GetPackageInfo Method

Definition

Overloads

GetPackageInfo(VersionedPackage, PackageInfoFlags)
GetPackageInfo(String, PackageInfoFlags)

Retrieve overall information about an application package that is installed on the system.

GetPackageInfo(VersionedPackage, PackageInfoFlags)

[Android.Runtime.Register("getPackageInfo", "(Landroid/content/pm/VersionedPackage;I)Landroid/content/pm/PackageInfo;", "GetGetPackageInfo_Landroid_content_pm_VersionedPackage_IHandler", ApiSince=26)]
public override Android.Content.PM.PackageInfo? GetPackageInfo (Android.Content.PM.VersionedPackage? versionedPackage, Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("getPackageInfo", "(Landroid/content/pm/VersionedPackage;I)Landroid/content/pm/PackageInfo;", "GetGetPackageInfo_Landroid_content_pm_VersionedPackage_IHandler", ApiSince=26)>]
override this.GetPackageInfo : Android.Content.PM.VersionedPackage * Android.Content.PM.PackageInfoFlags -> Android.Content.PM.PackageInfo

Parameters

versionedPackage
VersionedPackage

Returns

Attributes

Remarks

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

GetPackageInfo(String, PackageInfoFlags)

Retrieve overall information about an application package that is installed on the system.

[Android.Runtime.Register("getPackageInfo", "(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;", "GetGetPackageInfo_Ljava_lang_String_IHandler")]
public override Android.Content.PM.PackageInfo? GetPackageInfo (string? packageName, Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("getPackageInfo", "(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;", "GetGetPackageInfo_Ljava_lang_String_IHandler")>]
override this.GetPackageInfo : string * Android.Content.PM.PackageInfoFlags -> Android.Content.PM.PackageInfo

Parameters

packageName
String

The full name (i.e. com.google.apps.contacts) of the desired package.

flags
PackageInfoFlags

Additional option flags. Use any combination of Activities, Gids, Configurations, Instrumentation, Permissions, Providers, Receivers, Services, Signatures, UninstalledPackages to modify the data returned.

Returns

Attributes

Exceptions

Remarks

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