Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams#nestedclasses) \| [Methods](https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams#inhmethods)

# ForegroundGestureSubscriptionParams


`
public

final

class
ForegroundGestureSubscriptionParams
`


`

extends Object


`

`


`

|---|---|
| java.lang.Object ||
| ↳ | com.google.wear.input.ForegroundGestureSubscriptionParams |

<br />

*** ** * ** ***

Encapsulates parameters for subscribing to `https://developer.android.com/reference/com/google/wear/input/GestureEvent`s while the client is in the
foreground (visible to the user).

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams.Builder` Builder for `https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams`. |

| ### Public methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams#equals(java.lang.Object)(Object o) ` |
| ` int[]` | ` https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams#getActions()() ` The actions that are subscribed to. |
| ` View` | ` https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams#getView()() ` The `https://developer.android.com/reference/android/view/View` on which received `https://developer.android.com/reference/com/google/wear/input/GestureEvent`s will be processed. |
| ` Window` | ` https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams#getWindow()() ` The `https://developer.android.com/reference/android/view/Window` on which received `https://developer.android.com/reference/com/google/wear/input/GestureEvent`s will be processed. |
| ` int` | ` https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams#hashCode()() ` |
| ` boolean` | ` https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams#isAmbientSupported()() ` Whether `https://developer.android.com/reference/com/google/wear/input/GestureEvent`s will be detected and dispatched in ambient mode. |

| ### Inherited methods |
|---|---|
| From class ` java.lang.Object ` |---|---| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class<?>` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||

## Public methods

### equals

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

```
public boolean equals (Object o)
```

<br />

<br />

| Parameters ||
|---|---|
| `o` | `Object` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### getActions

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

```
public int[] getActions ()
```

The actions that are subscribed to.

<br />

| Returns ||
|---|---|
| `int[]` | Value is one of the following: - `https://developer.android.com/reference/com/google/wear/input/GestureEvent#ACTION_PRIMARY` - `https://developer.android.com/reference/com/google/wear/input/GestureEvent#ACTION_DISMISS` |

### getView

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

```
public View getView ()
```

The `https://developer.android.com/reference/android/view/View` on which received `https://developer.android.com/reference/com/google/wear/input/GestureEvent`s will be processed.

If a View is provided in the subscription, gesture events are delivered to the
subscription as long as the window to which this `https://developer.android.com/reference/android/view/View` is attached has focus (at the
time of registration, or, if it gains focus after registration).

A given params object will either have a `https://developer.android.com/reference/android/view/View` or a `https://developer.android.com/reference/android/view/Window`, not both. Thus,
if this is `null`, then `https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams#getWindow()` will NOT be `null`. If this is not
{code null}, then `https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams#getView()` will be `null`.

<br />

| Returns ||
|---|---|
| `View` | <br /> |

### getWindow

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

```
public Window getWindow ()
```

The `https://developer.android.com/reference/android/view/Window` on which received `https://developer.android.com/reference/com/google/wear/input/GestureEvent`s will be processed.

If a Window is provided in the subscription, gesture events are delivered to the
subscription long as this window has focus (at the time of registration, or, if it gains
focus after registration).

A given params object will either have a `https://developer.android.com/reference/android/view/View` or a `https://developer.android.com/reference/android/view/Window`, not both. Thus,
if this is `null`, then `https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams#getView()` will NOT be `null`. If this is not
{code null}, then `https://developer.android.com/reference/com/google/wear/input/ForegroundGestureSubscriptionParams#getWindow()` will be `null`.

<br />

| Returns ||
|---|---|
| `Window` | <br /> |

### hashCode

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

```
public int hashCode ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### isAmbientSupported

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

```
public boolean isAmbientSupported ()
```

Whether `https://developer.android.com/reference/com/google/wear/input/GestureEvent`s will be detected and dispatched in ambient mode.

If ambient mode is not supported, this subscription will be only for when the display's
state is `https://developer.android.com/reference/android/view/Display#STATE_ON`.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |