2017-11-08 00:34:50 +00:00
|
|
|
---
|
|
|
|
id: backandroid
|
|
|
|
title: BackAndroid
|
|
|
|
layout: docs
|
|
|
|
category: APIs
|
|
|
|
permalink: docs/backandroid.html
|
|
|
|
next: backhandler
|
|
|
|
previous: asyncstorage
|
|
|
|
---
|
|
|
|
|
2017-11-09 17:47:50 +00:00
|
|
|
**Deprecated.** Use [BackHandler](docs/backhandler.html) instead.
|
2017-11-08 00:34:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
### Methods
|
|
|
|
|
|
|
|
- [`exitApp`](docs/backandroid.html#exitapp)
|
|
|
|
- [`addEventListener`](docs/backandroid.html#addeventlistener)
|
|
|
|
- [`removeEventListener`](docs/backandroid.html#removeeventlistener)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
# Reference
|
|
|
|
|
|
|
|
## Methods
|
|
|
|
|
|
|
|
### `exitApp()`
|
|
|
|
|
|
|
|
```javascript
|
2017-11-09 17:47:50 +00:00
|
|
|
BackAndroid.exitApp()
|
2017-11-08 00:34:50 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
### `addEventListener()`
|
|
|
|
|
|
|
|
```javascript
|
2017-11-09 17:47:50 +00:00
|
|
|
BackAndroid.addEventListener(eventName, handler)
|
2017-11-08 00:34:50 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
### `removeEventListener()`
|
|
|
|
|
|
|
|
```javascript
|
2017-11-09 17:47:50 +00:00
|
|
|
BackAndroid.removeEventListener(eventName, handler)
|
2017-11-08 00:34:50 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|