# OnBackInvokedDefaultInput

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

*** ** * ** ***

Common/AllAndroid/JVMJavaScript
- android

  ```
  @RequiresApi(value = 33)
  class OnBackInvokedDefaultInput : OnBackInvokedInput
  ```

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||
| ↳ | [androidx.navigationevent.NavigationEventInput](https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput) |||
|   | ↳ | [androidx.navigationevent.OnBackInvokedInput](https://developer.android.com/reference/kotlin/androidx/navigationevent/OnBackInvokedInput) ||
|   |   | ↳ | [androidx.navigationevent.OnBackInvokedDefaultInput](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)`. The input will unregister this callback when there's no enabled `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHandler` with `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher#PRIORITY_DEFAULT()` priority.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigationevent/OnBackInvokedDefaultInput#OnBackInvokedDefaultInput(android.window.OnBackInvokedDispatcher)( onBackInvokedDispatcher: https://developer.android.com/reference/android/window/OnBackInvokedDispatcher.html )` | android |

### Inherited functions

From [androidx.navigationevent.NavigationEventInput](https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput) `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**.
android `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**.
android `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**.
android `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**.
android `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**.
android `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**.
android `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**.
android `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**.
android `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)`.
android `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.
android `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.
android `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.
android From [androidx.navigationevent.OnBackInvokedInput](https://developer.android.com/reference/kotlin/androidx/navigationevent/OnBackInvokedInput) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/navigationevent/OnBackInvokedInput#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.
android `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/navigationevent/OnBackInvokedInput#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`.
android

### Inherited properties

From [androidx.navigationevent.NavigationEventInput](https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput) `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.
android `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.
android `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.
android

## Public constructors

### OnBackInvokedDefaultInput

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

```
OnBackInvokedDefaultInput(
    onBackInvokedDispatcher: OnBackInvokedDispatcher
)
```

| Parameters |
|---|---|
| `onBackInvokedDispatcher: https://developer.android.com/reference/android/window/OnBackInvokedDispatcher.html` | the `https://developer.android.com/reference/android/window/OnBackInvokedDispatcher.html` to use. |