Added in API level 37

WebAppInstallRequest


open class WebAppInstallRequest
kotlin.Any
   ↳ android.content.pm.webapp.WebAppInstallRequest

Encapsulates the parameters and callback for installing a Web App.

Instances of this class are created using the Builder and passed to WebAppManager.install(WebAppInstallRequest,Executor,ObjIntConsumer).

Summary

Nested classes

Builder for creating WebAppInstallRequest instances.

Constants
static Int

The installation was cancelled by the user.

static Int

An installation request for the same Web App is already in progress.

static Int

The installation failed due to an internal system error.

static Int

The provided arguments (e.g., manifest URL) are invalid.

static Int

The installation failed due to network connectivity issues or timeout.

static Int

The calling app does not have the necessary permission to install Web Apps.

static Int

The installation was blocked due to security check failures.

static Int

The installation completed successfully.

static Int

The installation failed due to the service being unavailable.

static Int

The installation result is unknown.

Public methods
open String

Returns the PWA manifest URL.

open CharSequence

Returns the title provided for the installation request.

Constants

RESULT_CANCELLED_BY_USER

Added in API level 37
static val RESULT_CANCELLED_BY_USER: Int

The installation was cancelled by the user.

Value: 6

RESULT_DUPLICATED_REQUEST

Added in API level 37
static val RESULT_DUPLICATED_REQUEST: Int

An installation request for the same Web App is already in progress.

Value: 4

RESULT_INTERNAL_ERROR

Added in API level 37
static val RESULT_INTERNAL_ERROR: Int

The installation failed due to an internal system error.

Value: 2

RESULT_INVALID_ARGUMENTS

Added in API level 37
static val RESULT_INVALID_ARGUMENTS: Int

The provided arguments (e.g., manifest URL) are invalid.

Value: 5

RESULT_NETWORK_ERROR

Added in API level 37
static val RESULT_NETWORK_ERROR: Int

The installation failed due to network connectivity issues or timeout.

Value: 1

RESULT_PERMISSION_DENIED

Added in API level 37
static val RESULT_PERMISSION_DENIED: Int

The calling app does not have the necessary permission to install Web Apps.

The caller must be eligible to hold the android.app.role.RoleManager#ROLE_BROWSER role.

Value: 3

RESULT_SECURITY_ERROR

Added in API level 37
static val RESULT_SECURITY_ERROR: Int

The installation was blocked due to security check failures.

Value: 7

RESULT_SUCCESS

Added in API level 37
static val RESULT_SUCCESS: Int

The installation completed successfully.

Value: 0

RESULT_UNAVAILABLE

Added in API level 37
static val RESULT_UNAVAILABLE: Int

The installation failed due to the service being unavailable.

Value: 8

RESULT_UNKNOWN

Added in API level 37
static val RESULT_UNKNOWN: Int

The installation result is unknown.

Value: 9

Public methods

getManifestUrl

Added in API level 37
open fun getManifestUrl(): String

Returns the PWA manifest URL.

Return
String This value cannot be null.

getTitle

Added in API level 37
open fun getTitle(): CharSequence

Returns the title provided for the installation request.

Return
CharSequence This value cannot be null.