# OnBackInvokedOverlayInput

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.OnBackInvokedOverlayInput) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

*** ** * ** ***


```
@RequiresApi(value = 33)
public final class OnBackInvokedOverlayInput extends OnBackInvokedInput
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [androidx.navigationevent.NavigationEventInput](https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput) |||
|   | ↳ | [androidx.navigationevent.OnBackInvokedInput](https://developer.android.com/reference/androidx/navigationevent/OnBackInvokedInput) ||
|   |   | ↳ | [androidx.navigationevent.OnBackInvokedOverlayInput](https://developer.android.com/reference/androidx/navigationevent/OnBackInvokedOverlayInput) |

*** ** * ** ***

Provides input to a `https://developer.android.com/reference/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/androidx/navigationevent/OnBackInvokedOverlayInput#(android.window.OnBackInvokedDispatcher)`. The input will unregister this callback when there's no enabled `https://developer.android.com/reference/androidx/navigationevent/NavigationEventHandler` with `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher#PRIORITY_OVERLAY()` priority.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/navigationevent/OnBackInvokedOverlayInput#OnBackInvokedOverlayInput(android.window.OnBackInvokedDispatcher)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/window/OnBackInvokedDispatcher.html onBackInvokedDispatcher )` |

### Inherited methods

From [androidx.navigationevent.NavigationEventInput](https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput) `final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnBackCancelled()()`

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has been **cancelled**.
`final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnBackCompleted()()`

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **completed**.
`final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnBackProgressed(androidx.navigationevent.NavigationEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event)`

Notifies the dispatcher that an ongoing `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **progressed**.
`final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnBackStarted(androidx.navigationevent.NavigationEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event)`

Notifies the dispatcher that a `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **started**.
`final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnForwardCancelled()()`

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has been **cancelled**.
`final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnForwardCompleted()()`

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has **completed**.
`final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnForwardProgressed(androidx.navigationevent.NavigationEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event)`

Notifies the dispatcher that an ongoing `https://developer.android.com/reference/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has **progressed**.
`final void` `@https://developer.android.com/reference/androidx/annotation/MainThread
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#dispatchOnForwardStarted(androidx.navigationevent.NavigationEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEvent event)`

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

Tracks whether the connected `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/androidx/navigationevent/NavigationEventHandler` for back navigation matching this input's priority scope.
`final boolean` `https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#hasEnabledForwardHandlers()()`

Tracks whether the connected `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/androidx/navigationevent/NavigationEventHandler` for forward navigation matching this input's priority scope.
`final boolean` `https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#hasEnabledHandlers()()`

Tracks whether the connected `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/androidx/navigationevent/NavigationEventHandler` matching this input's priority scope.
`void` `@https://developer.android.com/reference/androidx/annotation/MainThread
@https://developer.android.com/reference/androidx/annotation/EmptySuper
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#onAdded(androidx.navigationevent.NavigationEventDispatcher)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher dispatcher)`

Called after this `https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput` is added to `https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#onAdded(androidx.navigationevent.NavigationEventDispatcher)`.
`void` `@https://developer.android.com/reference/androidx/annotation/MainThread
@https://developer.android.com/reference/androidx/annotation/EmptySuper
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#onHasEnabledForwardHandlersChanged(kotlin.Boolean)(boolean hasEnabledForwardHandlers)`

Called when the enabled state of forward handlers in the connected `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` changes.
`void` `@https://developer.android.com/reference/androidx/annotation/MainThread
@https://developer.android.com/reference/androidx/annotation/EmptySuper
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#onHasEnabledHandlersChanged(kotlin.Boolean)(boolean hasEnabledHandlers)`

Called when the enabled state of handlers (either back or forward) in the connected `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` changes.
`void` `@https://developer.android.com/reference/androidx/annotation/MainThread
@https://developer.android.com/reference/androidx/annotation/EmptySuper
https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput#onHistoryChanged(androidx.navigationevent.NavigationEventHistory)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigationevent/NavigationEventHistory history)`

Called when the `https://developer.android.com/reference/androidx/navigationevent/NavigationEventHistory` state in the connected `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` changes.
From [androidx.navigationevent.OnBackInvokedInput](https://developer.android.com/reference/androidx/navigationevent/OnBackInvokedInput) `void` `https://developer.android.com/reference/androidx/navigationevent/OnBackInvokedInput#onHasEnabledBackHandlersChanged(kotlin.Boolean)(boolean hasEnabledBackHandlers)`

Called when the enabled state of back handlers in the connected `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher` changes.
`void` `https://developer.android.com/reference/androidx/navigationevent/OnBackInvokedInput#onRemoved()()`

Called after this `https://developer.android.com/reference/androidx/navigationevent/NavigationEventInput` is removed from a `https://developer.android.com/reference/androidx/navigationevent/NavigationEventDispatcher`.

## Public constructors

### OnBackInvokedOverlayInput

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

```
public OnBackInvokedOverlayInput(
    @NonNull OnBackInvokedDispatcher onBackInvokedDispatcher
)
```

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