WebAppQueryRequest


public class WebAppQueryRequest
extends Object

java.lang.Object
   ↳ android.content.pm.webapp.WebAppQueryRequest


Encapsulates the parameters and callback for querying the status of a Web App package.

Instances of this class are passed to WebAppManager.query(WebAppQueryRequest,Executor,IntConsumer).

See also:

Summary

Constants

int RESULT_INSTALLED

The queried package is installed by WebAppManager and any of the following apply:

int RESULT_INTERNAL_ERROR

The query failed due to an internal system error.

int RESULT_NOT_INSTALLED

The queried package is not installed by WebAppManager.

int RESULT_PERMISSION_DENIED

The calling app does not have the necessary permissions to query this package.

int RESULT_UNAVAILABLE

The query failed due to the service being unavailable.

int RESULT_UNKNOWN

The query result is unknown.

Public constructors

WebAppQueryRequest(String packageName)

Creates a new WebAppQueryRequest with the target package name.

Public methods

String getPackageName()

Returns the package name being queried.

Inherited methods

Constants

RESULT_INSTALLED

Added in API level 37
public static final int RESULT_INSTALLED

The queried package is installed by WebAppManager and any of the following apply:

Constant Value: 0 (0x00000000)

RESULT_INTERNAL_ERROR

Added in API level 37
public static final int RESULT_INTERNAL_ERROR

The query failed due to an internal system error.

Constant Value: 2 (0x00000002)

RESULT_NOT_INSTALLED

Added in API level 37
public static final int RESULT_NOT_INSTALLED

The queried package is not installed by WebAppManager.

This result is returned if and only if:

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 permissions to query this package.

This result is returned if any of the following apply:

  • The package is not visible to the calling app.
  • The package was not installed by the calling app.

Constant Value: 3 (0x00000003)

RESULT_UNAVAILABLE

Added in API level 37
public static final int RESULT_UNAVAILABLE

The query failed due to the service being unavailable.

Constant Value: 4 (0x00000004)

RESULT_UNKNOWN

Added in API level 37
public static final int RESULT_UNKNOWN

The query result is unknown.

Constant Value: 5 (0x00000005)

Public constructors

WebAppQueryRequest

Added in API level 37
public WebAppQueryRequest (String packageName)

Creates a new WebAppQueryRequest with the target package name.

Parameters
packageName String: The name of the package to query.
This value cannot be null.

Public methods

getPackageName

Added in API level 37
public String getPackageName ()

Returns the package name being queried.

Returns
String This value cannot be null.