7
7
import com .facebook .react .bridge .ReactContextBaseJavaModule ;
8
8
import com .facebook .react .bridge .ReactMethod ;
9
9
import com .facebook .react .bridge .ReadableMap ;
10
+ import com .facebook .react .bridge .ReadableMapKeySetIterator ;
11
+ import com .facebook .react .bridge .ReadableNativeArray ;
10
12
import com .facebook .react .bridge .ReadableNativeMap ;
11
13
import com .google .firebase .remoteconfig .FirebaseRemoteConfig ;
12
14
15
+ import java .util .ArrayList ;
16
+ import java .util .HashMap ;
17
+
13
18
public class FBRemoteConfig extends ReactContextBaseJavaModule {
14
19
public Activity activity ;
15
20
@@ -24,7 +29,15 @@ public String getName() {
24
29
}
25
30
26
31
@ ReactMethod
27
- public boolean activateFetched (Promise promise ) {
32
+ public void setDeveloperMode (boolean enabled ) {
33
+ FirebaseRemoteConfigSettings configSettings = new FirebaseRemoteConfigSettings .Builder ()
34
+ .setDeveloperModeEnabled (enabled )
35
+ .build ();
36
+ FirebaseRemoteConfig .getInstance ().setConfigSettings (configSettings );
37
+ }
38
+
39
+ @ ReactMethod
40
+ public void activateFetched (Promise promise ) {
28
41
promise .resolve (
29
42
FirebaseRemoteConfig .getInstance ().activateFetched ()
30
43
);
@@ -69,28 +82,28 @@ public void getDouble(String key, Promise promise) {
69
82
}
70
83
71
84
@ ReactMethod
72
- public boolean getNamespacedLong (String key , String namespace , Promise promise ) {
85
+ public void getNamespacedLong (String key , String namespace , Promise promise ) {
73
86
promise .resolve (
74
87
FirebaseRemoteConfig .getInstance ().getLong (key , namespace )
75
88
);
76
89
}
77
90
78
91
@ ReactMethod
79
- public boolean getLong (String key , Promise promise ) {
92
+ public void getLong (String key , Promise promise ) {
80
93
promise .resolve (
81
94
FirebaseRemoteConfig .getInstance ().getLong (key )
82
95
);
83
96
}
84
97
85
98
@ ReactMethod
86
- public boolean getNamespacedString (String key , String namespace , Promise promise ) {
99
+ public void getNamespacedString (String key , String namespace , Promise promise ) {
87
100
promise .resolve (
88
101
FirebaseRemoteConfig .getInstance ().getString (key , namespace )
89
102
);
90
103
}
91
104
92
105
@ ReactMethod
93
- public boolean getString (String key , Promise promise ) {
106
+ public void getString (String key , Promise promise ) {
94
107
promise .resolve (
95
108
FirebaseRemoteConfig .getInstance ().getString (key )
96
109
);
0 commit comments