PackageInstaller.ExtraDeveloperVerificationFailureReason Field

Definition

When an installation fails because the developer verification was incomplete or blocked, this extra provides a code that explains the reason, such as #DEVELOPER_VERIFICATION_FAILED_REASON_NETWORK_UNAVAILABLE.

[Android.Runtime.Register("EXTRA_DEVELOPER_VERIFICATION_FAILURE_REASON", ApiSince=36)]
public const string ExtraDeveloperVerificationFailureReason;
[<Android.Runtime.Register("EXTRA_DEVELOPER_VERIFICATION_FAILURE_REASON", ApiSince=36)>]
val mutable ExtraDeveloperVerificationFailureReason : string

Field Value

Attributes

Remarks

When an installation fails because the developer verification was incomplete or blocked, this extra provides a code that explains the reason, such as #DEVELOPER_VERIFICATION_FAILED_REASON_NETWORK_UNAVAILABLE. It is included in the installation result returned via the IntentSender in Session#commit(IntentSender). However, along with this reason code, installers can receive different status codes from #EXTRA_STATUS depending on their target SDK and permission status: <ul> <li> Installers without the android.Manifest.permission#INSTALL_PACKAGES INSTALL_PACKAGES permission but with the android.Manifest.permission#REQUEST_INSTALL_PACKAGES REQUEST_INSTALL_PACKAGES permission and targeting android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM API 35 or less will first receive the #STATUS_PENDING_USER_ACTION status code without this reason code. They will be forced through the user action flow to allow the OS to inform the user of such verification context before continuing to fail the install. If the user has the option to bypass the verification result and chooses to do so, the installation will proceed. Otherwise, the installer will receive the #STATUS_FAILURE_ABORTED status code along with this reason code that explains why the verification had failed. </li> <li> Installers with the android.Manifest.permission#INSTALL_PACKAGES INSTALL_PACKAGES permission and targeting android.os.Build.VERSION_CODES#VANILLA_ICE_CREAM API 35 or less will directly receive the #STATUS_FAILURE_ABORTED status code. This is because they are not expected to have the capability of handling the #STATUS_PENDING_USER_ACTION flow, so the installation will directly fail. This reason code will be supplied to them for providing additional information. </li> <li> For all installers targeting android.os.Build.VERSION_CODES#BAKLAVA API 36 or higher: <ul> <li>For situations that require user input, such as when the developer verification policy allows the user to bypass a verification failure caused by network issues, the installer will receive a #STATUS_PENDING_USER_ACTION status code without this reason code. The installer will be forced through the user action flow to allow the OS to inform the user of such verification context before continuing to fail the installation. If the user has the option to bypass the verification result and chooses to do so, the installation will proceed. Otherwise, the install will receive the #STATUS_FAILURE_ABORTED status code along with this reason code that explains why the verification had failed. </li> <li>For all other situations, the installer will receive a #STATUS_FAILURE_ABORTED status code along with this reason code, so the installers can explain the failure to the user accordingly. An Intent#EXTRA_INTENT will also be populated with an intent that can provide additional context where appropriate, should the installer prefer to defer to the OS to explain the failure to the user. </li> </ul> </li> </ul>

Java documentation for android.content.pm.PackageInstaller.EXTRA_DEVELOPER_VERIFICATION_FAILURE_REASON.

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