handle back button press in JS

This commit is contained in:
Kyle Corbitt 2015-09-17 12:09:19 +01:00
parent a88a134b13
commit 88add08c2e
1 changed files with 9 additions and 0 deletions

View File

@ -44,6 +44,15 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
return super.onKeyUp(keyCode, event);
}
@Override
public void onBackPressed() {
if (mReactInstanceManager != null) {
mReactInstanceManager.onBackPressed();
} else {
super.onBackPressed();
}
}
@Override
public void invokeDefaultOnBackPressed() {
super.onBackPressed();