[android-components](../../index.md) / [mozilla.components.feature.session](../index.md) / [SessionFeature](index.md) / [onBackPressed](./on-back-pressed.md)

# onBackPressed

`fun onBackPressed(): `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/feature/session/src/main/java/mozilla/components/feature/session/SessionFeature.kt#L45)

Overrides [UserInteractionHandler.onBackPressed](../../mozilla.components.support.base.feature/-user-interaction-handler/on-back-pressed.md)

Handler for back pressed events in activities that use this feature.

**Return**
true if the event was handled, otherwise false.

