react-native/docs/backandroid.md

57 lines
706 B
Markdown
Raw Normal View History

---
id: backandroid
title: BackAndroid
layout: docs
category: APIs
permalink: docs/backandroid.html
next: backhandler
previous: asyncstorage
---
**Deprecated.** Use [BackHandler](docs/backhandler.html) instead.
### Methods
- [`exitApp`](docs/backandroid.html#exitapp)
- [`addEventListener`](docs/backandroid.html#addeventlistener)
- [`removeEventListener`](docs/backandroid.html#removeeventlistener)
---
# Reference
## Methods
### `exitApp()`
```javascript
BackAndroid.exitApp()
```
---
### `addEventListener()`
```javascript
BackAndroid.addEventListener(eventName, handler)
```
---
### `removeEventListener()`
```javascript
BackAndroid.removeEventListener(eventName, handler)
```