WebAppInstallRequest


public class WebAppInstallRequest
extends Object

java.lang.Object
   ↳ 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).

See also:

Summary

Nested classes

class WebAppInstallRequest.Builder

Builder for creating WebAppInstallRequest instances. 

Constants

int RESULT_CANCELLED_BY_USER

The installation was cancelled by the user.

int RESULT_DUPLICATED_REQUEST

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

int RESULT_INTERNAL_ERROR

The installation failed due to an internal system error.

int RESULT_INVALID_ARGUMENTS

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

int RESULT_NETWORK_ERROR

The installation failed due to network connectivity issues or timeout.

int RESULT_PERMISSION_DENIED

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

int RESULT_SECURITY_ERROR

The installation was blocked due to security check failures.

int RESULT_SUCCESS

The installation completed successfully.

int RESULT_UNAVAILABLE

The installation failed due to the service being unavailable.

int RESULT_UNKNOWN

The installation result is unknown.

Public methods

String getManifestUrl()

Returns the PWA manifest URL.

CharSequence getTitle()

Returns the title provided for the installation request.

Inherited methods

Constants

RESULT_CANCELLED_BY_USER

Added in API level 37
public static final int RESULT_CANCELLED_BY_USER

The installation was cancelled by the user.

Constant Value: 6 (0x00000006)

RESULT_DUPLICATED_REQUEST

Added in API level 37
public static final int RESULT_DUPLICATED_REQUEST

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

Constant Value: 4 (0x00000004)

RESULT_INTERNAL_ERROR

Added in API level 37
public static final int RESULT_INTERNAL_ERROR

The installation failed due to an internal system error.

Constant Value: 2 (0x00000002)

RESULT_INVALID_ARGUMENTS

Added in API level 37
public static final int RESULT_INVALID_ARGUMENTS

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

Constant Value: 5 (0x00000005)

RESULT_NETWORK_ERROR

Added in API level 37
public static final int RESULT_NETWORK_ERROR

The installation failed due to network connectivity issues or timeout.

Constant Value: 1 (0x00000001)

RESULT_PERMISSION_DENIED

Added in API level 37
public static final int RESULT_PERMISSION_DENIED

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

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

Constant Value: 3 (0x00000003)

RESULT_SECURITY_ERROR

Added in API level 37
public static final int RESULT_SECURITY_ERROR

The installation was blocked due to security check failures.

Constant Value: 7 (0x00000007)

RESULT_SUCCESS

Added in API level 37
public static final int RESULT_SUCCESS

The installation completed successfully.

Constant Value: 0 (0x00000000)

RESULT_UNAVAILABLE

Added in API level 37
public static final int RESULT_UNAVAILABLE

The installation failed due to the service being unavailable.

Constant Value: 8 (0x00000008)

RESULT_UNKNOWN

Added in API level 37
public static final int RESULT_UNKNOWN

The installation result is unknown.

Constant Value: 9 (0x00000009)

Public methods

getManifestUrl

Added in API level 37
public String getManifestUrl ()

Returns the PWA manifest URL.

Returns
String This value cannot be null.

getTitle

Added in API level 37
public CharSequence getTitle ()

Returns the title provided for the installation request.

Returns
CharSequence This value cannot be null.