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