Sdílet prostřednictvím


PackageManager.GetInstallSourceInfo(String) Method

Definition

Retrieves information about how a package was installed or updated.

[Android.Runtime.Register("getInstallSourceInfo", "(Ljava/lang/String;)Landroid/content/pm/InstallSourceInfo;", "GetGetInstallSourceInfo_Ljava_lang_String_Handler", ApiSince=30)]
public virtual Android.Content.PM.InstallSourceInfo GetInstallSourceInfo (string packageName);
[<Android.Runtime.Register("getInstallSourceInfo", "(Ljava/lang/String;)Landroid/content/pm/InstallSourceInfo;", "GetGetInstallSourceInfo_Ljava_lang_String_Handler", ApiSince=30)>]
abstract member GetInstallSourceInfo : string -> Android.Content.PM.InstallSourceInfo
override this.GetInstallSourceInfo : string -> Android.Content.PM.InstallSourceInfo

Parameters

packageName
String

The name of the package to query

Returns

Attributes

Remarks

Retrieves information about how a package was installed or updated.

If the calling application does not hold the INSTALL_PACKAGES permission then the result will always return null from InstallSourceInfo#getOriginatingPackageName().

If the package that requested the install has been uninstalled, then information about it will only be returned from InstallSourceInfo#getInitiatingPackageName() and InstallSourceInfo#getInitiatingPackageSigningInfo() if the calling package is requesting its own install information and is not an instant app.

Java documentation for android.content.pm.PackageManager.getInstallSourceInfo(java.lang.String).

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