From 86ab55328bbadb07ff3b2bec5a3feeaa39c29624 Mon Sep 17 00:00:00 2001 From: Benoit Lemaire Date: Mon, 13 Jun 2016 07:30:58 -0700 Subject: [PATCH] Fix and update Android documentation (Integrating with existing app section) Summary: Android documentation was not updated accordingly following a native Android API surface modification which ended up renaming a couple of methods (introduced in 19a1c4c22985ea6c7b475db71681bfc4dac4f1e0) This PR is fixing the documentation while at the same time updating the documentation in the same section adding another method which was introduced in the same commit and which needs to be called as well (please see comment in [ReactInstanceManager.java](https://github.com/facebook/react-native/blob/5b871ad9d73deb50c8423d81588cb5b0331e49d5/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java#L44) : `It's required to pass owning activity's lifecycle events to the instance manager [...]`) Closes https://github.com/facebook/react-native/pull/8032 Differential Revision: D3424674 fbshipit-source-id: 867f98ef210d7e9402afc278fb7b8e08890de3f0 --- docs/EmbeddedAppAndroid.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/EmbeddedAppAndroid.md b/docs/EmbeddedAppAndroid.md index 632fc13044..06d09404b1 100644 --- a/docs/EmbeddedAppAndroid.md +++ b/docs/EmbeddedAppAndroid.md @@ -83,7 +83,7 @@ protected void onPause() { super.onPause(); if (mReactInstanceManager != null) { - mReactInstanceManager.onPause(); + mReactInstanceManager.onHostPause(); } } @@ -92,7 +92,16 @@ protected void onResume() { super.onResume(); if (mReactInstanceManager != null) { - mReactInstanceManager.onResume(this, this); + mReactInstanceManager.onHostResume(this, this); + } +} + +@Override +protected void onDestroy() { + super.onDestroy(); + + if (mReactInstanceManager != null) { + mReactInstanceManager.onHostDestroy(); } } ```