react-native-repro 3.23.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/React-Repro.podspec +2 -2
- package/android/build.gradle +28 -1
- package/android/src/main/java/io/repro/android/reactbridge/{ReproReactBridgeModule.java → ReproReactBridgeModuleImpl.java} +265 -67
- package/android/src/main/java/io/repro/android/reactbridge/{ReproRemoteConfigBridge.java → ReproRemoteConfigBridgeModuleImpl.java} +19 -34
- package/android/src/newarch/java/io/repro/android/reactbridge/ReproEventEmitterOpenUrlModule.java +54 -0
- package/android/src/newarch/java/io/repro/android/reactbridge/ReproReactBridgeModule.java +367 -0
- package/android/src/newarch/java/io/repro/android/reactbridge/ReproReactBridgePackage.java +78 -0
- package/android/src/newarch/java/io/repro/android/reactbridge/ReproRemoteConfigBridgeModule.java +79 -0
- package/android/src/{main/java/io/repro/android/reactbridge/ReproEventEmitterOpenUrl.java → oldarch/java/io/repro/android/reactbridge/ReproEventEmitterOpenUrlModule.java} +4 -4
- package/android/src/oldarch/java/io/repro/android/reactbridge/ReproReactBridgeModule.java +365 -0
- package/android/src/oldarch/java/io/repro/android/reactbridge/ReproReactBridgePackage.java +29 -0
- package/android/src/oldarch/java/io/repro/android/reactbridge/ReproRemoteConfigBridgeModule.java +77 -0
- package/index.js +45 -228
- package/ios/RPRReproReactBridge.h +19 -4
- package/ios/{RPRReproReactBridge.m → RPRReproReactBridge.mm} +662 -187
- package/ios/RPRReproReactBridgeImpl.h +111 -0
- package/ios/RPRReproReactBridgeImpl.m +713 -0
- package/package.json +22 -1
- package/sdk-android/io/repro/repro-android-sdk/5.20.0/repro-android-sdk-5.20.0.aar +0 -0
- package/sdk-android/io/repro/repro-android-sdk/5.20.0/repro-android-sdk-5.20.0.aar.md5 +1 -0
- package/sdk-android/io/repro/repro-android-sdk/5.20.0/repro-android-sdk-5.20.0.aar.sha1 +1 -0
- package/sdk-android/io/repro/repro-android-sdk/5.20.0/repro-android-sdk-5.20.0.pom +24 -0
- package/sdk-android/io/repro/repro-android-sdk/5.20.0/repro-android-sdk-5.20.0.pom.md5 +1 -0
- package/sdk-android/io/repro/repro-android-sdk/5.20.0/repro-android-sdk-5.20.0.pom.sha1 +1 -0
- package/sdk-android/io/repro/repro-android-sdk/maven-metadata.xml +3 -3
- package/sdk-android/io/repro/repro-android-sdk/maven-metadata.xml.md5 +1 -1
- package/sdk-android/io/repro/repro-android-sdk/maven-metadata.xml.sha1 +1 -1
- package/sdk-ios/Repro.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/sdk-ios/Repro.xcframework/_CodeSignature/CodeRequirements-1 +0 -0
- package/sdk-ios/Repro.xcframework/_CodeSignature/CodeResources +18 -18
- package/sdk-ios/Repro.xcframework/_CodeSignature/CodeSignature +0 -0
- package/sdk-ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Headers/Repro.h +63 -0
- package/sdk-ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Info.plist +0 -0
- package/sdk-ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Repro +0 -0
- package/sdk-ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Headers/Repro.h +63 -0
- package/sdk-ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Info.plist +0 -0
- package/sdk-ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Repro +0 -0
- package/src/EventEmitterOpenUrl.js +24 -0
- package/src/NativeReproEventEmitterOpenUrl.ts +9 -0
- package/src/NativeReproReactBridge.ts +134 -0
- package/src/NativeReproRemoteConfigBridge.ts +26 -0
- package/src/NewsFeedManager.js +149 -0
- package/android/src/main/java/io/repro/android/reactbridge/ReproReactBridgePackage.java +0 -36
- package/repro-version.json +0 -5
- package/sdk-android/io/repro/repro-android-sdk/5.19.0/repro-android-sdk-5.19.0.aar +0 -0
- package/sdk-android/io/repro/repro-android-sdk/5.19.0/repro-android-sdk-5.19.0.aar.md5 +0 -1
- package/sdk-android/io/repro/repro-android-sdk/5.19.0/repro-android-sdk-5.19.0.aar.sha1 +0 -1
- package/sdk-android/io/repro/repro-android-sdk/5.19.0/repro-android-sdk-5.19.0.pom +0 -9
- package/sdk-android/io/repro/repro-android-sdk/5.19.0/repro-android-sdk-5.19.0.pom.md5 +0 -1
- package/sdk-android/io/repro/repro-android-sdk/5.19.0/repro-android-sdk-5.19.0.pom.sha1 +0 -1
|
@@ -10,17 +10,17 @@ import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
|
10
10
|
|
|
11
11
|
import io.repro.android.Repro;
|
|
12
12
|
|
|
13
|
+
public class ReproEventEmitterOpenUrlModule extends ReactContextBaseJavaModule {
|
|
13
14
|
|
|
14
|
-
public
|
|
15
|
+
public static final String NAME = "ReproEventEmitterOpenUrl";
|
|
15
16
|
|
|
16
17
|
private final ReactApplicationContext reactContext;
|
|
17
18
|
|
|
18
|
-
public
|
|
19
|
+
public ReproEventEmitterOpenUrlModule(ReactApplicationContext reactContext) {
|
|
19
20
|
super(reactContext);
|
|
20
21
|
this.reactContext = reactContext;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
// private void sendEvent(String eventName, @Nullable WritableMap params) {
|
|
24
24
|
private void sendEvent(String eventName, Object parameter) {
|
|
25
25
|
this.reactContext
|
|
26
26
|
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
|
|
@@ -29,7 +29,7 @@ public class ReproEventEmitterOpenUrl extends ReactContextBaseJavaModule {
|
|
|
29
29
|
|
|
30
30
|
@Override
|
|
31
31
|
public String getName() {
|
|
32
|
-
return
|
|
32
|
+
return NAME;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
@ReactMethod
|
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
|
|
2
|
+
package io.repro.android.reactbridge;
|
|
3
|
+
|
|
4
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
5
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
6
|
+
import com.facebook.react.bridge.ReactMethod;
|
|
7
|
+
import com.facebook.react.bridge.Callback;
|
|
8
|
+
import com.facebook.react.bridge.ReadableMap;
|
|
9
|
+
import com.facebook.react.bridge.ReadableArray;
|
|
10
|
+
|
|
11
|
+
import java.util.Map;
|
|
12
|
+
|
|
13
|
+
public class ReproReactBridgeModule extends ReactContextBaseJavaModule {
|
|
14
|
+
|
|
15
|
+
private ReproReactBridgeModuleImpl reproModuleImpl;
|
|
16
|
+
|
|
17
|
+
public ReproReactBridgeModule(ReactApplicationContext reactContext) {
|
|
18
|
+
super(reactContext);
|
|
19
|
+
this.reproModuleImpl = new ReproReactBridgeModuleImpl();
|
|
20
|
+
this.reproModuleImpl.versionPassing();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@Override
|
|
24
|
+
public String getName() {
|
|
25
|
+
return this.reproModuleImpl.NAME;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@Override
|
|
29
|
+
public Map<String, Object> getConstants() {
|
|
30
|
+
return this.reproModuleImpl.getConstants();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@ReactMethod
|
|
34
|
+
public void optIn(boolean endUserOptedIn) {
|
|
35
|
+
this.reproModuleImpl.optIn(endUserOptedIn);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@ReactMethod
|
|
39
|
+
public void setUserID(final String userId) {
|
|
40
|
+
this.reproModuleImpl.setUserID(userId);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@ReactMethod
|
|
44
|
+
public void getUserID(Callback callback) {
|
|
45
|
+
this.reproModuleImpl.getUserID(callback);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@ReactMethod
|
|
49
|
+
public void setSilverEggCookie(final String cookie) {
|
|
50
|
+
this.reproModuleImpl.setSilverEggCookie(cookie);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@ReactMethod
|
|
54
|
+
public void setSilverEggProdKey(final String prodKey) {
|
|
55
|
+
this.reproModuleImpl.setSilverEggProdKey(prodKey);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@ReactMethod
|
|
59
|
+
public void setLogLevel(final int logLevel) {
|
|
60
|
+
this.reproModuleImpl.setLogLevel(logLevel);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@ReactMethod
|
|
64
|
+
public void setStringUserProfile(final String key, final String value) {
|
|
65
|
+
this.reproModuleImpl.setStringUserProfile(key, value);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@ReactMethod
|
|
69
|
+
public void setIntUserProfile(final String key, final int value) {
|
|
70
|
+
this.reproModuleImpl.setIntUserProfile(key, value);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@ReactMethod
|
|
74
|
+
public void setDoubleUserProfile(final String key, final double value) {
|
|
75
|
+
this.reproModuleImpl.setDoubleUserProfile(key, value);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@ReactMethod
|
|
79
|
+
public void setDateUserProfile(final String key, final String value) {
|
|
80
|
+
this.reproModuleImpl.setDateUserProfile(key, value);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@ReactMethod
|
|
84
|
+
public void setUserEmailAddress(final String mailAddr) {
|
|
85
|
+
this.reproModuleImpl.setUserEmailAddress(mailAddr);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@ReactMethod
|
|
89
|
+
public void setUserGender(final int gender) {
|
|
90
|
+
this.reproModuleImpl.setUserGender(gender);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@ReactMethod
|
|
94
|
+
public void setUserResidencePrefecture(final int prefecture) {
|
|
95
|
+
this.reproModuleImpl.setUserResidencePrefecture(prefecture);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@ReactMethod
|
|
99
|
+
public void setUserDateOfBirth(final String value) {
|
|
100
|
+
this.reproModuleImpl.setUserDateOfBirth(value);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@ReactMethod
|
|
104
|
+
public void setUserAge(int age) {
|
|
105
|
+
this.reproModuleImpl.setUserAge(age);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@ReactMethod
|
|
109
|
+
public void onlySetIfAbsentStringUserProfile(String key, String value) {
|
|
110
|
+
this.reproModuleImpl.onlySetIfAbsentStringUserProfile(key, value);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@ReactMethod
|
|
114
|
+
public void onlySetIfAbsentIntUserProfile(String key, int value) {
|
|
115
|
+
this.reproModuleImpl.onlySetIfAbsentIntUserProfile(key, value);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@ReactMethod
|
|
119
|
+
public void onlySetIfAbsentDoubleUserProfile(String key, double value) {
|
|
120
|
+
this.reproModuleImpl.onlySetIfAbsentDoubleUserProfile(key, value);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@ReactMethod
|
|
124
|
+
public void onlySetIfAbsentDateUserProfile(String key, String value) {
|
|
125
|
+
this.reproModuleImpl.onlySetIfAbsentDateUserProfile(key, value);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@ReactMethod
|
|
129
|
+
public void incrementIntUserProfileBy(String key, int value) {
|
|
130
|
+
this.reproModuleImpl.incrementIntUserProfileBy(key, value);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@ReactMethod
|
|
134
|
+
public void decrementIntUserProfileBy(String key, int value) {
|
|
135
|
+
this.reproModuleImpl.decrementIntUserProfileBy(key, value);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@ReactMethod
|
|
139
|
+
public void incrementDoubleUserProfileBy(String key, double value) {
|
|
140
|
+
this.reproModuleImpl.incrementDoubleUserProfileBy(key, value);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@ReactMethod
|
|
144
|
+
public void decrementDoubleUserProfileBy(String key, double value) {
|
|
145
|
+
this.reproModuleImpl.decrementDoubleUserProfileBy(key, value);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@ReactMethod
|
|
149
|
+
public void onlySetIfAbsentUserGender(final int gender) {
|
|
150
|
+
this.reproModuleImpl.onlySetIfAbsentUserGender(gender);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@ReactMethod
|
|
154
|
+
public void onlySetIfAbsentUserEmailAddress(String email) {
|
|
155
|
+
this.reproModuleImpl.onlySetIfAbsentUserEmailAddress(email);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@ReactMethod
|
|
159
|
+
public void onlySetIfAbsentUserResidencePrefecture(final int prefecture) {
|
|
160
|
+
this.reproModuleImpl.onlySetIfAbsentUserResidencePrefecture(prefecture);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@ReactMethod
|
|
164
|
+
public void onlySetIfAbsentUserDateOfBirth(final String value) {
|
|
165
|
+
this.reproModuleImpl.onlySetIfAbsentUserDateOfBirth(value);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@ReactMethod
|
|
169
|
+
public void onlySetIfAbsentUserAge(int age) {
|
|
170
|
+
this.reproModuleImpl.onlySetIfAbsentUserAge(age);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@ReactMethod
|
|
174
|
+
public void incrementUserAgeBy(int value) {
|
|
175
|
+
this.reproModuleImpl.incrementUserAgeBy(value);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@ReactMethod
|
|
179
|
+
public void decrementUserAgeBy(int value) {
|
|
180
|
+
this.reproModuleImpl.decrementUserAgeBy(value);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@ReactMethod
|
|
184
|
+
public void deleteUserProfile(String key) {
|
|
185
|
+
this.reproModuleImpl.deleteUserProfile(key);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@ReactMethod
|
|
189
|
+
public void deleteUserGender() {
|
|
190
|
+
this.reproModuleImpl.deleteUserGender();
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@ReactMethod
|
|
194
|
+
public void deleteUserEmailAddress() {
|
|
195
|
+
this.reproModuleImpl.deleteUserEmailAddress();
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
@ReactMethod
|
|
199
|
+
public void deleteUserResidencePrefecture() {
|
|
200
|
+
this.reproModuleImpl.deleteUserResidencePrefecture();
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@ReactMethod
|
|
204
|
+
public void deleteUserDateOfBirth() {
|
|
205
|
+
this.reproModuleImpl.deleteUserDateOfBirth();
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@ReactMethod
|
|
209
|
+
public void deleteUserAge() {
|
|
210
|
+
this.reproModuleImpl.deleteUserAge();
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
@ReactMethod
|
|
214
|
+
public void getDeviceID(Callback callback) {
|
|
215
|
+
this.reproModuleImpl.getDeviceID(callback);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@ReactMethod
|
|
219
|
+
public void disableInAppMessagesOnForegroundTransition() {
|
|
220
|
+
this.reproModuleImpl.disableInAppMessagesOnForegroundTransition();
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@ReactMethod
|
|
224
|
+
public void enableInAppMessagesOnForegroundTransition() {
|
|
225
|
+
this.reproModuleImpl.enableInAppMessagesOnForegroundTransition(this.getCurrentActivity());
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
@ReactMethod
|
|
229
|
+
public void setPushDeviceTokenString(final String deviceTokenHexString) {
|
|
230
|
+
this.reproModuleImpl.setPushDeviceTokenString(deviceTokenHexString);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@ReactMethod
|
|
234
|
+
public void setPushRegistrationID(final String pushRegId) {
|
|
235
|
+
this.reproModuleImpl.setPushRegistrationID(pushRegId);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@ReactMethod
|
|
239
|
+
public void setPushToken(final String token) {
|
|
240
|
+
this.reproModuleImpl.setPushRegistrationID(token);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
@ReactMethod
|
|
244
|
+
public void enablePushNotification() {
|
|
245
|
+
this.reproModuleImpl.enablePushNotification();
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@ReactMethod
|
|
249
|
+
public void linkLineID(final String lineUserId, final String lineChannelId) {
|
|
250
|
+
this.reproModuleImpl.linkLineID(lineUserId, lineChannelId);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@ReactMethod
|
|
254
|
+
public void unlinkLineID(final String lineUserId, final String lineChannelId) {
|
|
255
|
+
this.reproModuleImpl.unlinkLineID(lineUserId, lineChannelId);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
@ReactMethod
|
|
259
|
+
public void _handleWebViewUrl(String requestUrl) {
|
|
260
|
+
this.reproModuleImpl._webviewJavaScriptOpenUrlHandler(requestUrl);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
@ReactMethod
|
|
264
|
+
public void track(final String name, final ReadableMap properties) {
|
|
265
|
+
this.reproModuleImpl.track(name, properties);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
@ReactMethod
|
|
269
|
+
public void trackViewContent(final String contentId, final ReadableMap props) {
|
|
270
|
+
this.reproModuleImpl.trackViewContent(contentId, props);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
@ReactMethod
|
|
274
|
+
public void trackSearch(final ReadableMap props) {
|
|
275
|
+
this.reproModuleImpl.trackSearch(props);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@ReactMethod
|
|
279
|
+
public void trackAddToWishlist(final ReadableMap props) {
|
|
280
|
+
this.reproModuleImpl.trackAddToWishlist(props);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
@ReactMethod
|
|
284
|
+
public void trackAddToCart(final String contentId, final ReadableMap props) {
|
|
285
|
+
this.reproModuleImpl.trackAddToCart(contentId, props);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
@ReactMethod
|
|
289
|
+
public void trackInitiateCheckout(final ReadableMap props) {
|
|
290
|
+
this.reproModuleImpl.trackInitiateCheckout(props);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
@ReactMethod
|
|
294
|
+
public void trackAddPaymentInfo(final ReadableMap props) {
|
|
295
|
+
this.reproModuleImpl.trackAddPaymentInfo(props);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
@ReactMethod
|
|
299
|
+
public void trackPurchase(final String contentId, final double value, final String currency, final ReadableMap props) {
|
|
300
|
+
this.reproModuleImpl.trackPurchase(contentId, value, currency, props);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
@ReactMethod
|
|
304
|
+
public void trackShare(final ReadableMap props) {
|
|
305
|
+
this.reproModuleImpl.trackShare(props);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
@ReactMethod
|
|
309
|
+
public void trackCompleteRegistration(final ReadableMap props) {
|
|
310
|
+
this.reproModuleImpl.trackCompleteRegistration(props);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
@ReactMethod
|
|
314
|
+
public void trackLead(final ReadableMap props) {
|
|
315
|
+
this.reproModuleImpl.trackLead(props);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
@ReactMethod
|
|
319
|
+
public void trackNotificationOpened(final String notificationId) {
|
|
320
|
+
this.reproModuleImpl.trackNotificationOpened(notificationId);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
@ReactMethod
|
|
324
|
+
public void getNewsFeeds(final int limit, Callback callback) {
|
|
325
|
+
// Only New Architecture method
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
@ReactMethod
|
|
329
|
+
public void oldArchGetNewsFeeds(final int limit, final int campaignType, Callback callback) {
|
|
330
|
+
this.reproModuleImpl.oldArchGetNewsFeeds(limit, campaignType, callback);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
@ReactMethod
|
|
334
|
+
public void getNewsFeedsFor(final int limit, final int offsetID, Callback callback) {
|
|
335
|
+
// Only New Architecture method
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
@ReactMethod
|
|
339
|
+
public void oldArchGetNewsFeedsFor(final int limit, final int offsetID, final int campaignType, Callback callback) {
|
|
340
|
+
this.reproModuleImpl.oldArchGetNewsFeedsFor(limit, offsetID, campaignType, callback);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
@ReactMethod
|
|
344
|
+
public void getNewsFeedsWithCampaignType(final int limit, final int campaignType, Callback callback) {
|
|
345
|
+
// Only New Architecture method
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
@ReactMethod
|
|
349
|
+
public void getNewsFeedsWithCampaignTypeFor(final int limit, final int offsetID, final int campaignType, Callback callback) {
|
|
350
|
+
// Only New Architecture method
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
@ReactMethod
|
|
354
|
+
public void updateNewsFeeds(ReadableArray array, Callback callback) {
|
|
355
|
+
// Only New Architecture method
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
@ReactMethod
|
|
359
|
+
public void oldArchUpdateNewsFeeds(ReadableArray array, Callback callback) {
|
|
360
|
+
this.reproModuleImpl.oldArchUpdateNewsFeeds(array, callback);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
package io.repro.android.reactbridge;
|
|
2
|
+
|
|
3
|
+
import androidx.annotation.NonNull;
|
|
4
|
+
import com.facebook.react.ReactPackage;
|
|
5
|
+
import com.facebook.react.bridge.NativeModule;
|
|
6
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
7
|
+
import com.facebook.react.uimanager.ViewManager;
|
|
8
|
+
import java.util.ArrayList;
|
|
9
|
+
import java.util.Collections;
|
|
10
|
+
import java.util.List;
|
|
11
|
+
|
|
12
|
+
public class ReproReactBridgePackage implements ReactPackage {
|
|
13
|
+
|
|
14
|
+
@NonNull
|
|
15
|
+
@Override
|
|
16
|
+
public List<NativeModule> createNativeModules(@NonNull ReactApplicationContext reactContext) {
|
|
17
|
+
List<NativeModule> modules = new ArrayList<>();
|
|
18
|
+
modules.add(new ReproReactBridgeModule(reactContext));
|
|
19
|
+
modules.add(new ReproRemoteConfigBridgeModule(reactContext));
|
|
20
|
+
modules.add(new ReproEventEmitterOpenUrlModule(reactContext));
|
|
21
|
+
return modules;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@NonNull
|
|
25
|
+
@Override
|
|
26
|
+
public List<ViewManager> createViewManagers(@NonNull ReactApplicationContext reactContext) {
|
|
27
|
+
return Collections.emptyList();
|
|
28
|
+
}
|
|
29
|
+
}
|
package/android/src/oldarch/java/io/repro/android/reactbridge/ReproRemoteConfigBridgeModule.java
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
package io.repro.android.reactbridge;
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.ReactApplicationContext;
|
|
4
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
5
|
+
import com.facebook.react.bridge.ReactMethod;
|
|
6
|
+
import com.facebook.react.bridge.Callback;
|
|
7
|
+
import com.facebook.react.bridge.ReadableMap;
|
|
8
|
+
|
|
9
|
+
import java.util.Map;
|
|
10
|
+
|
|
11
|
+
public class ReproRemoteConfigBridgeModule extends ReactContextBaseJavaModule {
|
|
12
|
+
|
|
13
|
+
private ReproRemoteConfigBridgeModuleImpl remoteConfigModuleImpl;
|
|
14
|
+
|
|
15
|
+
public ReproRemoteConfigBridgeModule(ReactApplicationContext reactContext) {
|
|
16
|
+
super(reactContext);
|
|
17
|
+
this.remoteConfigModuleImpl = new ReproRemoteConfigBridgeModuleImpl();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@Override
|
|
21
|
+
public String getName() {
|
|
22
|
+
return this.remoteConfigModuleImpl.NAME;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@Override
|
|
26
|
+
public Map<String, Object> getConstants() {
|
|
27
|
+
return this.remoteConfigModuleImpl.getConstants();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@ReactMethod
|
|
31
|
+
public void fetch(final int timeout, final Callback callback) {
|
|
32
|
+
this.remoteConfigModuleImpl.fetch(timeout, callback);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@ReactMethod
|
|
36
|
+
public void activateFetched() {
|
|
37
|
+
this.remoteConfigModuleImpl.activateFetched();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Default value settings
|
|
41
|
+
@ReactMethod
|
|
42
|
+
public void setDefaultsFromDictionary(final ReadableMap values) {
|
|
43
|
+
this.remoteConfigModuleImpl.setDefaultsFromDictionary(values);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@ReactMethod
|
|
47
|
+
public void setDefaultsFromJsonString(final String jsonStr) {
|
|
48
|
+
this.remoteConfigModuleImpl.setDefaultsFromJsonString(jsonStr);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@ReactMethod
|
|
52
|
+
public void getValue(final String key, final Callback callback) {
|
|
53
|
+
this.remoteConfigModuleImpl.getValue(key, callback);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Value accessor
|
|
57
|
+
@ReactMethod
|
|
58
|
+
public void getAllValues(final Callback callback) {
|
|
59
|
+
this.remoteConfigModuleImpl.getAllValues(callback);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@ReactMethod
|
|
63
|
+
public void getAllValuesWithPrefix(final String prefix, final Callback callback) {
|
|
64
|
+
this.remoteConfigModuleImpl.getAllValuesWithPrefix(prefix, callback);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@ReactMethod
|
|
68
|
+
public void getLocalDefaultValue(final String key, final Callback callback) {
|
|
69
|
+
this.remoteConfigModuleImpl.getLocalDefaultValue(key, callback);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Others
|
|
73
|
+
@ReactMethod
|
|
74
|
+
public void forceReset() {
|
|
75
|
+
this.remoteConfigModuleImpl.forceReset();
|
|
76
|
+
}
|
|
77
|
+
}
|