Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/content/pm/webapp/WebAppQueryRequest#constants) \| [Ctors](https://developer.android.com/reference/android/content/pm/webapp/WebAppQueryRequest#pubctors) \| [Methods](https://developer.android.com/reference/android/content/pm/webapp/WebAppQueryRequest#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/content/pm/webapp/WebAppQueryRequest#inhmethods)

# WebAppQueryRequest

*** ** * ** ***

` public class WebAppQueryRequest `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.content.pm.webapp.WebAppQueryRequest |

<br />

*** ** * ** ***

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

Instances of this class are passed to `https://developer.android.com/reference/android/content/pm/webapp/WebAppManager#query(android.content.pm.webapp.WebAppQueryRequest,%20java.util.concurrent.Executor,%20java.util.function.IntConsumer)`.
**See also:**

- `https://developer.android.com/reference/android/content/pm/webapp/WebAppManager`

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/content/pm/webapp/WebAppQueryRequest#RESULT_INSTALLED` The queried package is installed by `https://developer.android.com/reference/android/content/pm/webapp/WebAppManager` and any of the following apply: - The calling app holds `https://developer.android.com/reference/android/Manifest.permission#QUERY_ALL_PACKAGES` permission. <br /> |
| `int` | `https://developer.android.com/reference/android/content/pm/webapp/WebAppQueryRequest#RESULT_INTERNAL_ERROR` The query failed due to an internal system error. |
| `int` | `https://developer.android.com/reference/android/content/pm/webapp/WebAppQueryRequest#RESULT_NOT_INSTALLED` The queried package is not installed by `https://developer.android.com/reference/android/content/pm/webapp/WebAppManager`. |
| `int` | `https://developer.android.com/reference/android/content/pm/webapp/WebAppQueryRequest#RESULT_PERMISSION_DENIED` The calling app does not have the necessary permissions to query this package. |
| `int` | `https://developer.android.com/reference/android/content/pm/webapp/WebAppQueryRequest#RESULT_UNAVAILABLE` The query failed due to the service being unavailable. |
| `int` | `https://developer.android.com/reference/android/content/pm/webapp/WebAppQueryRequest#RESULT_UNKNOWN` The query result is unknown. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/content/pm/webapp/WebAppQueryRequest#WebAppQueryRequest(java.lang.String)(https://developer.android.com/reference/java/lang/String packageName) ` Creates a new `https://developer.android.com/reference/android/content/pm/webapp/WebAppQueryRequest` with the target package name. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/content/pm/webapp/WebAppQueryRequest#getPackageName()() ` Returns the package name being queried. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Constants

### RESULT_INSTALLED

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int RESULT_INSTALLED
```

The queried package is installed by `https://developer.android.com/reference/android/content/pm/webapp/WebAppManager` and any of the following apply:

- The calling app holds `https://developer.android.com/reference/android/Manifest.permission#QUERY_ALL_PACKAGES` permission.
- The package was installed by the calling app via `https://developer.android.com/reference/android/content/pm/webapp/WebAppManager`.

<br />

<br />

Constant Value: 0 (0x00000000)

### RESULT_INTERNAL_ERROR

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int RESULT_INTERNAL_ERROR
```

The query failed due to an internal system error.

<br />

Constant Value: 2 (0x00000002)

### RESULT_NOT_INSTALLED

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int RESULT_NOT_INSTALLED
```

The queried package is not installed by `https://developer.android.com/reference/android/content/pm/webapp/WebAppManager`.

This result is returned if and only if:

- The calling app holds `https://developer.android.com/reference/android/Manifest.permission#QUERY_ALL_PACKAGES` permission.
- The package is not installed by `https://developer.android.com/reference/android/content/pm/webapp/WebAppManager`.

<br />

<br />

Constant Value: 1 (0x00000001)

### RESULT_PERMISSION_DENIED

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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.

<br />

<br />

Constant Value: 3 (0x00000003)

### RESULT_UNAVAILABLE

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int RESULT_UNAVAILABLE
```

The query failed due to the service being unavailable.

<br />

Constant Value: 4 (0x00000004)

### RESULT_UNKNOWN

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int RESULT_UNKNOWN
```

The query result is unknown.

<br />

Constant Value: 5 (0x00000005)

## Public constructors

### WebAppQueryRequest

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WebAppQueryRequest (String packageName)
```

Creates a new `https://developer.android.com/reference/android/content/pm/webapp/WebAppQueryRequest` with the target package name.

<br />

| Parameters ||
|---|---|
| `packageName` | `String`: The name of the package to query. This value cannot be `null`. <br /> |

## Public methods

### getPackageName

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getPackageName ()
```

Returns the package name being queried.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | This value cannot be `null`. <br /> |