# NavigationEventInput

Artifact: [androidx.navigationevent:navigationevent](https://developer.android.com/jetpack/androidx/releases/navigationevent) [View Source](https://cs.android.com/search?q=file:androidx/navigationevent/NavigationEventInput.kt+class:androidx.navigationevent.NavigationEventInput) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

*** ** * ** ***

Common/AllAndroid/JVMJavaScript
- Cmn

  ```
  abstract class NavigationEventInput
  ```
Known direct subclasses [BrowserInput](https://developer.android.com/reference/kotlin/androidx/navigationevent/BrowserInput), [DirectNavigationEventInput](https://developer.android.com/reference/kotlin/androidx/navigationevent/DirectNavigationEventInput), [OnBackInvokedInput](https://developer.android.com/reference/kotlin/androidx/navigationevent/OnBackInvokedInput)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigationevent/BrowserInput` | A `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput` that translates browser history navigation events (popstate) into `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` events. |
| `https://developer.android.com/reference/kotlin/androidx/navigationevent/DirectNavigationEventInput` | An input that can send events to a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher`. |
| `https://developer.android.com/reference/kotlin/androidx/navigationevent/OnBackInvokedInput` | Provides input to a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` by registering an `https://developer.android.com/reference/android/window/OnBackInvokedCallback.html` to the passed in `https://developer.android.com/reference/kotlin/androidx/navigationevent/OnBackInvokedInput#(android.window.OnBackInvokedDispatcher,kotlin.Int)`. |

Known indirect subclasses [OnBackInvokedDefaultInput](https://developer.android.com/reference/kotlin/androidx/navigationevent/OnBackInvokedDefaultInput), [OnBackInvokedOverlayInput](https://developer.android.com/reference/kotlin/androidx/navigationevent/OnBackInvokedOverlayInput)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigationevent/OnBackInvokedDefaultInput` | Provides input to a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` by registering an `https://developer.android.com/reference/android/window/OnBackInvokedCallback.html` with the `https://developer.android.com/reference/android/window/OnBackInvokedDispatcher.html#PRIORITY_DEFAULT` priority to `https://developer.android.com/reference/kotlin/androidx/navigationevent/OnBackInvokedDefaultInput#(android.window.OnBackInvokedDispatcher)`. |
| `https://developer.android.com/reference/kotlin/androidx/navigationevent/OnBackInvokedOverlayInput` | Provides input to a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` by registering an `https://developer.android.com/reference/android/window/OnBackInvokedCallback.html` with the `https://developer.android.com/reference/android/window/OnBackInvokedDispatcher.html#PRIORITY_OVERLAY` priority to `https://developer.android.com/reference/kotlin/androidx/navigationevent/OnBackInvokedOverlayInput#(android.window.OnBackInvokedDispatcher)`. |

*** ** * ** ***

An abstract class for components that generate and dispatch navigation events.

This class acts as the "input" side of the navigation system, translating platform-specific events (like system back gestures or button clicks) into standardized events that can be sent to a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher`.

Subclasses are responsible for implementing the logic that sources these events and calling the `dispatchOn...` methods (e.g., `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnBackStarted(androidx.navigationevent.NavigationEvent)`) to propagate them through the system.

An input must be registered with a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` using `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher#addInput(androidx.navigationevent.NavigationEventInput)` to function.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` |   |
| `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHandler` |   |

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#NavigationEventInput()()` | Cmn |

| ### Protected functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnBackCancelled()()` Notifies the dispatcher that the ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has been **cancelled**. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnBackCompleted()()` Notifies the dispatcher that the ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **completed**. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnBackProgressed(androidx.navigationevent.NavigationEvent)(event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent)` Notifies the dispatcher that an ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **progressed**. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnBackStarted(androidx.navigationevent.NavigationEvent)(event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent)` Notifies the dispatcher that a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **started**. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnForwardCancelled()()` Notifies the dispatcher that the ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has been **cancelled**. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnForwardCompleted()()` Notifies the dispatcher that the ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has **completed**. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnForwardProgressed(androidx.navigationevent.NavigationEvent)(event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent)` Notifies the dispatcher that an ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has **progressed**. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnForwardStarted(androidx.navigationevent.NavigationEvent)(event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent)` Notifies the dispatcher that a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has **started**. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread @https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onAdded(androidx.navigationevent.NavigationEventDispatcher)(dispatcher: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher)` Called after this `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput` is added to `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onAdded(androidx.navigationevent.NavigationEventDispatcher)`. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread @https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onHasEnabledBackHandlersChanged(kotlin.Boolean)(hasEnabledBackHandlers: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Called when the enabled state of back handlers in the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` changes. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread @https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onHasEnabledForwardHandlersChanged(kotlin.Boolean)(hasEnabledForwardHandlers: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Called when the enabled state of forward handlers in the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` changes. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread @https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onHasEnabledHandlersChanged(kotlin.Boolean)(hasEnabledHandlers: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Called when the enabled state of handlers (either back or forward) in the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` changes. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread @https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onHistoryChanged(androidx.navigationevent.NavigationEventHistory)(history: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHistory)` Called when the `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHistory` state in the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` changes. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread @https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onRemoved()()` Called after this `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput` is removed from a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher`. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#hasEnabledBackHandlers()` Tracks whether the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHandler` for back navigation matching this input's priority scope. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#hasEnabledForwardHandlers()` Tracks whether the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHandler` for forward navigation matching this input's priority scope. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#hasEnabledHandlers()` Tracks whether the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHandler` matching this input's priority scope. | Cmn |

## Public constructors

### NavigationEventInput

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
NavigationEventInput()
```

## Protected functions

### dispatchOnBackCancelled

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
protected fun dispatchOnBackCancelled(): Unit
```

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has been **cancelled**.

This is a **terminal** event. The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher#transitionState()` will become `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState.Idle` and ready for a new gesture.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this input is not added to a dispatcher. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this dispatcher is disposed. |

### dispatchOnBackCompleted

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
protected fun dispatchOnBackCompleted(): Unit
```

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **completed**.

This is a **terminal** event, signaling that the navigation should be finalized (e.g., popping the back stack). The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher#transitionState()` will become `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState.Idle` and ready for a new gesture.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this input is not added to a dispatcher. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this dispatcher is disposed. |

### dispatchOnBackProgressed

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
protected fun dispatchOnBackProgressed(event: NavigationEvent): Unit
```

Notifies the dispatcher that an ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **progressed**.

The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher#transitionState()` will become `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState.InProgress`.

| Parameters |
|---|---|
| `event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` | The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` describing the progress of the gesture. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this input is not added to a dispatcher. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this dispatcher is disposed. |

### dispatchOnBackStarted

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
protected fun dispatchOnBackStarted(event: NavigationEvent): Unit
```

Notifies the dispatcher that a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **started**.

The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher#transitionState()` will become `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState.InProgress`.

| Parameters |
|---|---|
| `event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` | The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` describing the start of the gesture (e.g., touch position). |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this input is not added to a dispatcher. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this dispatcher is disposed. |

### dispatchOnForwardCancelled

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
protected fun dispatchOnForwardCancelled(): Unit
```

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has been **cancelled**.

This is a **terminal** event. The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher#transitionState()` will become `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState.Idle` and ready for a new gesture.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this input is not added to a dispatcher. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this dispatcher is disposed. |

### dispatchOnForwardCompleted

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
protected fun dispatchOnForwardCompleted(): Unit
```

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has **completed**.

This is a **terminal** event, signaling that the navigation should be finalized (e.g., popping the back stack). The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher#transitionState()` will become `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState.Idle` and ready for a new gesture.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this input is not added to a dispatcher. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this dispatcher is disposed. |

### dispatchOnForwardProgressed

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
protected fun dispatchOnForwardProgressed(event: NavigationEvent): Unit
```

Notifies the dispatcher that an ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has **progressed**.

The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher#transitionState()` will become `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState.InProgress`.

| Parameters |
|---|---|
| `event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` | The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` describing the progress of the gesture. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this input is not added to a dispatcher. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this dispatcher is disposed. |

### dispatchOnForwardStarted

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
protected fun dispatchOnForwardStarted(event: NavigationEvent): Unit
```

Notifies the dispatcher that a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has **started**.

The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher#transitionState()` will become `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState.InProgress`.

| Parameters |
|---|---|
| `event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` | The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` describing the start of the gesture (e.g., touch position). |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this input is not added to a dispatcher. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | if this dispatcher is disposed. |

### onAdded

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
@EmptySuper
protected open fun onAdded(dispatcher: NavigationEventDispatcher): Unit
```

Called after this `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput` is added to `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onAdded(androidx.navigationevent.NavigationEventDispatcher)`. This can happen when calling `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher#addInput(androidx.navigationevent.NavigationEventInput)`. A `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput` can only be added to one `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` at a time.

| Parameters |
|---|---|
| `dispatcher: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` | The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` that this input is now added to. |

### onHasEnabledBackHandlersChanged

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.2.0)

```
@MainThread
@EmptySuper
protected open fun onHasEnabledBackHandlersChanged(hasEnabledBackHandlers: Boolean): Unit
```

Called when the enabled state of back handlers in the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` changes.

The exact set of handlers this reflects depends on the `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher.Priority` this input was registered with.

| Parameters |
|---|---|
| `hasEnabledBackHandlers: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the connected dispatcher has any enabled back handlers matching this input's priority scope. |

### onHasEnabledForwardHandlersChanged

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.2.0)

```
@MainThread
@EmptySuper
protected open fun onHasEnabledForwardHandlersChanged(hasEnabledForwardHandlers: Boolean): Unit
```

Called when the enabled state of forward handlers in the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` changes.

The exact set of handlers this reflects depends on the `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher.Priority` this input was registered with.

| Parameters |
|---|---|
| `hasEnabledForwardHandlers: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the connected dispatcher has any enabled forward handlers matching this input's priority scope. |

### onHasEnabledHandlersChanged

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
@EmptySuper
protected open fun onHasEnabledHandlersChanged(hasEnabledHandlers: Boolean): Unit
```

Called when the enabled state of handlers (either back or forward) in the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` changes.

This allows the input to enable or disable its own event sourcing. For example, a system back gesture input might only register for gestures when `hasEnabledHandlers` is `true`.

The exact set of handlers this reflects depends on the `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher.Priority` this input was registered with.

| Parameters |
|---|---|
| `hasEnabledHandlers: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | Whether the connected dispatcher has any enabled handlers (back or forward) matching this input's priority scope. |

### onHistoryChanged

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
@EmptySuper
protected open fun onHistoryChanged(history: NavigationEventHistory): Unit
```

Called when the `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHistory` state in the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` changes.

| Parameters |
|---|---|
| `history: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHistory` | The new, immutable snapshot of the navigation history. |

### onRemoved

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
@EmptySuper
protected open fun onRemoved(): Unit
```

Called after this `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput` is removed from a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher`. This can happen when calling `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher#removeInput(androidx.navigationevent.NavigationEventInput)` or `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher#dispose()` on the containing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher`.

## Public properties

### hasEnabledBackHandlers

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.2.0)

```
val hasEnabledBackHandlers: Boolean
```

Tracks whether the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHandler` for back navigation matching this input's priority scope.

### hasEnabledForwardHandlers

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.2.0)

```
val hasEnabledForwardHandlers: Boolean
```

Tracks whether the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHandler` for forward navigation matching this input's priority scope.

### hasEnabledHandlers

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.2.0)

```
val hasEnabledHandlers: Boolean
```

Tracks whether the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHandler` matching this input's priority scope.