> For the complete documentation index, see [llms.txt](https://docs.emobiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/device/onbackbutton.md).

# onBackButton

## Description

Triggers the back button to navigate to another page. This is applicable to android devices only.

## Input / Parameter

N/A

## Output

N/A

## Callback

### callback

The function to be executed when the back button is triggered to navigate to the page specified successfully.

## Video

Coming Soon.

## Example

The user wants to redirect to another page when they press the back button.

### Steps

| No. | Description                      |                                                                                                                                                 |
| --- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| 1.  | ![](/files/dQqkoHIyqu5EdoufMd9P) | Drag a button to a page in the mobile designer. Select the event `click` for the button and drag the `onBackButton` function to the event flow. |
| 2.  | ![](/files/M31beucXomiaUMSQfgzq) | Drag the function to be executed when the back button is triggered. In this example, we are using the `gotoPage` function.                      |
| 3.  | ![](/files/yO93mKiiMZV5XyBc8QUj) | Select the page to navigate to.                                                                                                                 |

### Result

When the back button is pressed, the current page will redirect to pgWelcome.

## Links
