다음을 통해 공유


PackageManager.GetApplicationInfo Method

Definition

Overloads

GetApplicationInfo(String, PackageManager+ApplicationInfoFlags)
GetApplicationInfo(String, PackageInfoFlags)

Retrieve all of the information we know about a particular package/application.

GetApplicationInfo(String, PackageManager+ApplicationInfoFlags)

[Android.Runtime.Register("getApplicationInfo", "(Ljava/lang/String;Landroid/content/pm/PackageManager$ApplicationInfoFlags;)Landroid/content/pm/ApplicationInfo;", "GetGetApplicationInfo_Ljava_lang_String_Landroid_content_pm_PackageManager_ApplicationInfoFlags_Handler", ApiSince=33)]
public virtual Android.Content.PM.ApplicationInfo GetApplicationInfo (string packageName, Android.Content.PM.PackageManager.ApplicationInfoFlags flags);
[<Android.Runtime.Register("getApplicationInfo", "(Ljava/lang/String;Landroid/content/pm/PackageManager$ApplicationInfoFlags;)Landroid/content/pm/ApplicationInfo;", "GetGetApplicationInfo_Ljava_lang_String_Landroid_content_pm_PackageManager_ApplicationInfoFlags_Handler", ApiSince=33)>]
abstract member GetApplicationInfo : string * Android.Content.PM.PackageManager.ApplicationInfoFlags -> Android.Content.PM.ApplicationInfo
override this.GetApplicationInfo : string * Android.Content.PM.PackageManager.ApplicationInfoFlags -> Android.Content.PM.ApplicationInfo

Parameters

packageName
String

Returns

Attributes

Applies to

GetApplicationInfo(String, PackageInfoFlags)

Retrieve all of the information we know about a particular package/application.

[Android.Runtime.Register("getApplicationInfo", "(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;", "GetGetApplicationInfo_Ljava_lang_String_IHandler")]
public abstract Android.Content.PM.ApplicationInfo GetApplicationInfo (string packageName, Android.Content.PM.PackageInfoFlags flags);
[<Android.Runtime.Register("getApplicationInfo", "(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;", "GetGetApplicationInfo_Ljava_lang_String_IHandler")>]
abstract member GetApplicationInfo : string * Android.Content.PM.PackageInfoFlags -> Android.Content.PM.ApplicationInfo

Parameters

packageName
String

The full name (i.e. com.google.apps.contacts) of an application.

flags
PackageInfoFlags

Additional option flags to modify the data returned.

Returns

An ApplicationInfo containing information about the package. If flag MATCH_UNINSTALLED_PACKAGES is set and if the package is not found in the list of installed applications, the application 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

Exceptions

Remarks

Retrieve all of the information we know about a particular package/application.

Use #getApplicationInfo(String, ApplicationInfoFlags) when long flags are needed.

Java documentation for android.content.pm.PackageManager.getApplicationInfo(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