From ef3298a0100ed69dadee94d3fc06a6b280823ee9 Mon Sep 17 00:00:00 2001 From: Website Deployment Script Date: Wed, 3 Aug 2016 02:49:35 +0000 Subject: [PATCH] Updated docs for next --- releases/next/docs/backandroid.html | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/releases/next/docs/backandroid.html b/releases/next/docs/backandroid.html index 5b9cbdc2309..0f5aed5e03a 100644 --- a/releases/next/docs/backandroid.html +++ b/releases/next/docs/backandroid.html @@ -1,10 +1,13 @@ BackAndroid – React Native | A framework for building native apps using React

BackAndroid #

Edit on GitHub

Detect hardware back button presses, and programmatically invoke the default back button functionality to exit the app if there are no listeners or if none of the listeners return true.

Example:

BackAndroid.addEventListener('hardwareBackPress', function() { - if (!this.onMainScreen()) { - this.goBack(); - return true; - } - return false; + // this.onMainScreen and this.goBack are just examples, you need to use your own implementation here + // Typically you would use the navigator here to go to the last state. + + if (!this.onMainScreen()) { + this.goBack(); + return true; + } + return false; });

Methods #

static exitApp(0) #

static addEventListener(eventName, handler) #

static removeEventListener(eventName, handler) #

© 2016 Facebook Inc.