|
@@ -3,11 +3,14 @@ package com.reactnativenavigation.controllers;
|
3
|
3
|
import android.os.Bundle;
|
4
|
4
|
import android.support.v7.app.AppCompatActivity;
|
5
|
5
|
|
|
6
|
+import com.facebook.react.ReactInstanceManager;
|
6
|
7
|
import com.facebook.react.ReactNativeHost;
|
7
|
8
|
import com.facebook.react.ReactPackage;
|
|
9
|
+import com.facebook.react.bridge.ReactContext;
|
8
|
10
|
import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler;
|
9
|
11
|
import com.facebook.react.shell.MainReactPackage;
|
10
|
12
|
import com.reactnativenavigation.R;
|
|
13
|
+import com.reactnativenavigation.react.NavigationEventEmitter;
|
11
|
14
|
import com.reactnativenavigation.react.NavigationPackage;
|
12
|
15
|
import com.reactnativenavigation.react.ReactDevPermission;
|
13
|
16
|
|
|
@@ -42,7 +45,15 @@ public class NavigationActivity extends AppCompatActivity implements DefaultHard
|
42
|
45
|
return;
|
43
|
46
|
}
|
44
|
47
|
|
|
48
|
+ host.getReactInstanceManager().addReactInstanceEventListener(new ReactInstanceManager.ReactInstanceEventListener() {
|
|
49
|
+ @Override
|
|
50
|
+ public void onReactContextInitialized(ReactContext context) {
|
|
51
|
+ new NavigationEventEmitter(context).emitAppLaunched();
|
|
52
|
+ }
|
|
53
|
+ });
|
45
|
54
|
host.getReactInstanceManager().createReactContextInBackground();
|
|
55
|
+
|
|
56
|
+
|
46
|
57
|
}
|
47
|
58
|
|
48
|
59
|
@Override
|