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
|
| static Int |
The query failed due to an internal system error. |
| static Int |
The queried package is not installed by |
| 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 |
|
| Public methods | |
|---|---|
| open String |
Returns the package name being queried. |
Constants
RESULT_INSTALLED
static val RESULT_INSTALLED: Int
The queried package is installed by WebAppManager and any of the following apply:
- The calling app holds
android.Manifest.permission#QUERY_ALL_PACKAGESpermission. - The package was installed by the calling app via
WebAppManager.
Value: 0RESULT_INTERNAL_ERROR
static val RESULT_INTERNAL_ERROR: Int
The query failed due to an internal system error.
Value: 2RESULT_NOT_INSTALLED
static val RESULT_NOT_INSTALLED: Int
The queried package is not installed by WebAppManager.
This result is returned if and only if:
- The calling app holds
android.Manifest.permission#QUERY_ALL_PACKAGESpermission. - The package is not installed by
WebAppManager.
Value: 1RESULT_PERMISSION_DENIED
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: 3RESULT_UNAVAILABLE
static val RESULT_UNAVAILABLE: Int
The query failed due to the service being unavailable.
Value: 4RESULT_UNKNOWN
static val RESULT_UNKNOWN: Int
The query result is unknown.
Value: 5Public constructors
WebAppQueryRequest
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
open fun getPackageName(): String
Returns the package name being queried.
| Return | |
|---|---|
String |
This value cannot be null. |