Udostępnij za pośrednictwem


Intent.ActionInstallPackage Field

Definition

Activity Action: Launch application installer.

[Android.Runtime.Register("ACTION_INSTALL_PACKAGE")]
public const string ActionInstallPackage;
[<Android.Runtime.Register("ACTION_INSTALL_PACKAGE")>]
val mutable ActionInstallPackage : string

Field Value

Implements

Attributes

Remarks

Activity Action: Launch application installer.

Input: The data must be a content: URI at which the application can be retrieved. As of android.os.Build.VERSION_CODES#JELLY_BEAN_MR1, you can also use "package:<package-name>" to install an application for the current user that is already installed for another user. You can optionally supply #EXTRA_INSTALLER_PACKAGE_NAME, #EXTRA_NOT_UNKNOWN_SOURCE, #EXTRA_ALLOW_REPLACE, and #EXTRA_RETURN_RESULT.

Output: If #EXTRA_RETURN_RESULT, returns whether the install succeeded.

<strong>Note:</strong>If your app is targeting API level higher than 25 you need to hold android.Manifest.permission#REQUEST_INSTALL_PACKAGES in order to launch the application installer.

This member is deprecated. use android.content.pm.PackageInstaller instead

Java documentation for android.content.Intent.ACTION_INSTALL_PACKAGE.

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

See also