BackAndroid

Detect hardware back button presses, and programatically 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; });

Methods #

static exitApp() #

static addEventListener(eventName: BackPressEventName, handler: Function) #

static removeEventListener(eventName: BackPressEventName, handler: Function) #