Android Guides | Samples

Android.Content.PM.PackageManager.GetPackageInfo Method

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

Syntax

[Android.Runtime.Register("getPackageInfo", "(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;", "GetGetPackageInfo_Ljava_lang_String_IHandler")]
public abstract PackageInfo GetPackageInfo (String packageName, [Android.Runtime.GeneratedEnum] PackageInfoFlags flags)

Parameters

packageName
The full name (i.e. com.google.apps.contacts) of the desired package.
flags
Additional option flags. Use any combination of PackageInfoFlags.Activities, PackageInfoFlags.Gids, PackageInfoFlags.Configurations, PackageInfoFlags.Instrumentation, PackageInfoFlags.Permissions, PackageInfoFlags.Providers, PackageInfoFlags.Receivers, PackageInfoFlags.Services, PackageInfoFlags.Signatures, PackageInfoFlags.UninstalledPackages to modify the data returned.

Exceptions

TypeReason
!:NoType:android/content/pm/PackageManager$NameNotFoundException;Href=../../../../reference/android/content/pm/PackageManager.NameNotFoundException.html

Remarks

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

Throws PackageManager+NameNotFoundException if a package with the given name can not be found on the system.

[Android Documentation]

Requirements

Namespace: Android.Content.PM
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1