|
@@ -4,22 +4,23 @@ import android.app.Application;
|
4
|
4
|
|
5
|
5
|
import com.facebook.react.ReactApplication;
|
6
|
6
|
import com.facebook.react.ReactNativeHost;
|
7
|
|
-import com.reactnativenavigation.controllers.ActivityLifecycleDelegate;
|
8
|
7
|
import com.reactnativenavigation.controllers.Store;
|
|
8
|
+import com.reactnativenavigation.react.DevPermissionRequest;
|
|
9
|
+import com.reactnativenavigation.react.NavigationReactInitializer;
|
9
|
10
|
import com.reactnativenavigation.react.NavigationReactNativeHost;
|
10
|
11
|
|
11
|
12
|
public abstract class NavigationApplication extends Application implements ReactApplication {
|
12
|
13
|
|
13
|
14
|
private Store store;
|
14
|
15
|
private NavigationReactNativeHost reactNativeHost;
|
15
|
|
- ActivityLifecycleDelegate activityLifecycle;
|
|
16
|
+ private NavigationReactInitializer initializer;
|
16
|
17
|
|
17
|
18
|
@Override
|
18
|
19
|
public void onCreate() {
|
19
|
20
|
super.onCreate();
|
20
|
21
|
store = new Store();
|
21
|
22
|
reactNativeHost = new NavigationReactNativeHost(this, isDebug(), store);
|
22
|
|
- activityLifecycle = new ActivityLifecycleDelegate(reactNativeHost.getReactInstanceManager(), isDebug());
|
|
23
|
+ initializer = new NavigationReactInitializer(reactNativeHost.getReactInstanceManager(), new DevPermissionRequest(isDebug()));
|
23
|
24
|
}
|
24
|
25
|
|
25
|
26
|
@Override
|
|
@@ -28,4 +29,8 @@ public abstract class NavigationApplication extends Application implements React
|
28
|
29
|
}
|
29
|
30
|
|
30
|
31
|
public abstract boolean isDebug();
|
|
32
|
+
|
|
33
|
+ NavigationReactInitializer getInitializer() {
|
|
34
|
+ return initializer;
|
|
35
|
+ }
|
31
|
36
|
}
|