mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
2.8 KiB
2.8 KiB
id, title
| id | title |
|---|---|
| backandroid | backandroid |
BackAndroid
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;
});