We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4732edc commit 32bce31Copy full SHA for 32bce31
packages/platform-android/native_modules.gradle
@@ -17,10 +17,16 @@ import java.util.ArrayList;
17
{{ packageImports }}
18
19
public class PackageList {
20
+ private Application application;
21
private ReactNativeHost reactNativeHost;
22
public PackageList(ReactNativeHost reactNativeHost) {
23
this.reactNativeHost = reactNativeHost;
24
}
25
+
26
+ public PackageList(Application application) {
27
+ this.reactNativeHost = null;
28
+ this.application = application;
29
+ }
30
31
private ReactNativeHost getReactNativeHost() {
32
return this.reactNativeHost;
@@ -31,6 +37,7 @@ public class PackageList {
37
38
33
39
private Application getApplication() {
40
+ if (this.reactNativeHost == null) return this.application;
34
41
return this.reactNativeHost.getApplication();
35
42
36
43
0 commit comments