Added in API level 37

WebAppQueryRequest


open class WebAppQueryRequest
kotlin.Any
   ↳ 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).

Summary

Constants
static Int

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

static Int

The query failed due to an internal system error.

static Int

The queried package is not installed by WebAppManager.

static Int

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

static Int

The query failed due to the service being unavailable.

static Int

The query result is unknown.

Public constructors
WebAppQueryRequest(packageName: String)

Creates a new WebAppQueryRequest with the target package name.

Public methods
open String

Returns the package name being queried.

Constants

RESULT_INSTALLED

Added in API level 37
static val RESULT_INSTALLED: Int

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

Value: 0

RESULT_INTERNAL_ERROR

Added in API level 37
static val RESULT_INTERNAL_ERROR: Int

The query failed due to an internal system error.

Value: 2

RESULT_NOT_INSTALLED

Added in API level 37
static val RESULT_NOT_INSTALLED: Int

The queried package is not installed by WebAppManager.

This result is returned if and only if:

Value: 1

RESULT_PERMISSION_DENIED

Added in API level 37
static val RESULT_PERMISSION_DENIED: Int

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.
Value: 3

RESULT_UNAVAILABLE

Added in API level 37
static val RESULT_UNAVAILABLE: Int

The query failed due to the service being unavailable.

Value: 4

RESULT_UNKNOWN

Added in API level 37
static val RESULT_UNKNOWN: Int

The query result is unknown.

Value: 5

Public constructors

WebAppQueryRequest

Added in API level 37
WebAppQueryRequest(packageName: String)

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
open fun getPackageName(): String

Returns the package name being queried.

Return
String This value cannot be null.