reactnative-plugin-appice 1.7.21 → 1.7.23
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/android/build.gradle +1 -1
- package/android/obfuscationdictionary.txt +501 -0
- package/android/src/main/AndroidManifest.xml +12 -1
- package/android/src/main/java/com/reactlibrary/AppICEUtils.java +11 -15
- package/android/src/main/java/com/reactlibrary/AppIceReactPluginModule.java +11 -9
- package/android/src/main/java/com/reactlibrary/EnumConstants.java +32 -29
- package/android/src/main/java/com/reactlibrary/StringConstants.java +15 -0
- package/example/ancilliary.js +3 -1
- package/example/yarn.lock +6199 -6736
- package/package.json +1 -1
- package/android/src/main/test +0 -0
- package/example/android/local.properties +0 -8
package/android/build.gradle
CHANGED
|
@@ -113,7 +113,7 @@ dependencies {
|
|
|
113
113
|
annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.3.1"
|
|
114
114
|
|
|
115
115
|
//appice
|
|
116
|
-
implementation 'appice.io.android:sdk:2.5.
|
|
116
|
+
implementation 'appice.io.android:sdk:2.5.90'
|
|
117
117
|
|
|
118
118
|
//glide
|
|
119
119
|
implementation "com.github.bumptech.glide:glide:4.11.0"
|
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
ai1
|
|
2
|
+
ai2
|
|
3
|
+
ai3
|
|
4
|
+
ai4
|
|
5
|
+
ai5
|
|
6
|
+
ai6
|
|
7
|
+
ai7
|
|
8
|
+
ai8
|
|
9
|
+
ai9
|
|
10
|
+
ai10
|
|
11
|
+
ai11
|
|
12
|
+
ai12
|
|
13
|
+
ai13
|
|
14
|
+
ai14
|
|
15
|
+
ai15
|
|
16
|
+
ai16
|
|
17
|
+
ai17
|
|
18
|
+
ai18
|
|
19
|
+
ai19
|
|
20
|
+
ai20
|
|
21
|
+
ai21
|
|
22
|
+
ai22
|
|
23
|
+
ai23
|
|
24
|
+
ai24
|
|
25
|
+
ai25
|
|
26
|
+
ai26
|
|
27
|
+
ai27
|
|
28
|
+
ai28
|
|
29
|
+
ai29
|
|
30
|
+
ai30
|
|
31
|
+
ai31
|
|
32
|
+
ai32
|
|
33
|
+
ai33
|
|
34
|
+
ai34
|
|
35
|
+
ai35
|
|
36
|
+
ai36
|
|
37
|
+
ai37
|
|
38
|
+
ai38
|
|
39
|
+
ai39
|
|
40
|
+
ai40
|
|
41
|
+
ai41
|
|
42
|
+
ai42
|
|
43
|
+
ai43
|
|
44
|
+
ai44
|
|
45
|
+
ai45
|
|
46
|
+
ai46
|
|
47
|
+
ai47
|
|
48
|
+
ai48
|
|
49
|
+
ai49
|
|
50
|
+
ai50
|
|
51
|
+
ai51
|
|
52
|
+
ai52
|
|
53
|
+
ai53
|
|
54
|
+
ai54
|
|
55
|
+
ai55
|
|
56
|
+
ai56
|
|
57
|
+
ai57
|
|
58
|
+
ai58
|
|
59
|
+
ai59
|
|
60
|
+
ai60
|
|
61
|
+
ai61
|
|
62
|
+
ai62
|
|
63
|
+
ai63
|
|
64
|
+
ai64
|
|
65
|
+
ai65
|
|
66
|
+
ai66
|
|
67
|
+
ai67
|
|
68
|
+
ai68
|
|
69
|
+
ai69
|
|
70
|
+
ai70
|
|
71
|
+
ai71
|
|
72
|
+
ai72
|
|
73
|
+
ai73
|
|
74
|
+
ai74
|
|
75
|
+
ai75
|
|
76
|
+
ai76
|
|
77
|
+
ai77
|
|
78
|
+
ai78
|
|
79
|
+
ai79
|
|
80
|
+
ai80
|
|
81
|
+
ai81
|
|
82
|
+
ai82
|
|
83
|
+
ai83
|
|
84
|
+
ai84
|
|
85
|
+
ai85
|
|
86
|
+
ai86
|
|
87
|
+
ai87
|
|
88
|
+
ai88
|
|
89
|
+
ai89
|
|
90
|
+
ai90
|
|
91
|
+
ai91
|
|
92
|
+
ai92
|
|
93
|
+
ai93
|
|
94
|
+
ai94
|
|
95
|
+
ai95
|
|
96
|
+
ai96
|
|
97
|
+
ai97
|
|
98
|
+
ai98
|
|
99
|
+
ai99
|
|
100
|
+
ai100
|
|
101
|
+
ai101
|
|
102
|
+
ai102
|
|
103
|
+
ai103
|
|
104
|
+
ai104
|
|
105
|
+
ai105
|
|
106
|
+
ai106
|
|
107
|
+
ai107
|
|
108
|
+
ai108
|
|
109
|
+
ai109
|
|
110
|
+
ai110
|
|
111
|
+
ai111
|
|
112
|
+
ai112
|
|
113
|
+
ai113
|
|
114
|
+
ai114
|
|
115
|
+
ai115
|
|
116
|
+
ai116
|
|
117
|
+
ai117
|
|
118
|
+
ai118
|
|
119
|
+
ai119
|
|
120
|
+
ai120
|
|
121
|
+
ai121
|
|
122
|
+
ai122
|
|
123
|
+
ai123
|
|
124
|
+
ai124
|
|
125
|
+
ai125
|
|
126
|
+
ai126
|
|
127
|
+
ai127
|
|
128
|
+
ai128
|
|
129
|
+
ai129
|
|
130
|
+
ai130
|
|
131
|
+
ai131
|
|
132
|
+
ai132
|
|
133
|
+
ai133
|
|
134
|
+
ai134
|
|
135
|
+
ai135
|
|
136
|
+
ai136
|
|
137
|
+
ai137
|
|
138
|
+
ai138
|
|
139
|
+
ai139
|
|
140
|
+
ai140
|
|
141
|
+
ai141
|
|
142
|
+
ai142
|
|
143
|
+
ai143
|
|
144
|
+
ai144
|
|
145
|
+
ai145
|
|
146
|
+
ai146
|
|
147
|
+
ai147
|
|
148
|
+
ai148
|
|
149
|
+
ai149
|
|
150
|
+
ai150
|
|
151
|
+
ai151
|
|
152
|
+
ai152
|
|
153
|
+
ai153
|
|
154
|
+
ai154
|
|
155
|
+
ai155
|
|
156
|
+
ai156
|
|
157
|
+
ai157
|
|
158
|
+
ai158
|
|
159
|
+
ai159
|
|
160
|
+
ai160
|
|
161
|
+
ai161
|
|
162
|
+
ai162
|
|
163
|
+
ai163
|
|
164
|
+
ai164
|
|
165
|
+
ai165
|
|
166
|
+
ai166
|
|
167
|
+
ai167
|
|
168
|
+
ai168
|
|
169
|
+
ai169
|
|
170
|
+
ai170
|
|
171
|
+
ai171
|
|
172
|
+
ai172
|
|
173
|
+
ai173
|
|
174
|
+
ai174
|
|
175
|
+
ai175
|
|
176
|
+
ai176
|
|
177
|
+
ai177
|
|
178
|
+
ai178
|
|
179
|
+
ai179
|
|
180
|
+
ai180
|
|
181
|
+
ai181
|
|
182
|
+
ai182
|
|
183
|
+
ai183
|
|
184
|
+
ai184
|
|
185
|
+
ai185
|
|
186
|
+
ai186
|
|
187
|
+
ai187
|
|
188
|
+
ai188
|
|
189
|
+
ai189
|
|
190
|
+
ai190
|
|
191
|
+
ai191
|
|
192
|
+
ai192
|
|
193
|
+
ai193
|
|
194
|
+
ai194
|
|
195
|
+
ai195
|
|
196
|
+
ai196
|
|
197
|
+
ai197
|
|
198
|
+
ai198
|
|
199
|
+
ai199
|
|
200
|
+
ai200
|
|
201
|
+
ai201
|
|
202
|
+
ai202
|
|
203
|
+
ai203
|
|
204
|
+
ai204
|
|
205
|
+
ai205
|
|
206
|
+
ai206
|
|
207
|
+
ai207
|
|
208
|
+
ai208
|
|
209
|
+
ai209
|
|
210
|
+
ai210
|
|
211
|
+
ai211
|
|
212
|
+
ai212
|
|
213
|
+
ai213
|
|
214
|
+
ai214
|
|
215
|
+
ai215
|
|
216
|
+
ai216
|
|
217
|
+
ai217
|
|
218
|
+
ai218
|
|
219
|
+
ai219
|
|
220
|
+
ai220
|
|
221
|
+
ai221
|
|
222
|
+
ai222
|
|
223
|
+
ai223
|
|
224
|
+
ai224
|
|
225
|
+
ai225
|
|
226
|
+
ai226
|
|
227
|
+
ai227
|
|
228
|
+
ai228
|
|
229
|
+
ai229
|
|
230
|
+
ai230
|
|
231
|
+
ai231
|
|
232
|
+
ai232
|
|
233
|
+
ai233
|
|
234
|
+
ai234
|
|
235
|
+
ai235
|
|
236
|
+
ai236
|
|
237
|
+
ai237
|
|
238
|
+
ai238
|
|
239
|
+
ai239
|
|
240
|
+
ai240
|
|
241
|
+
ai241
|
|
242
|
+
ai242
|
|
243
|
+
ai243
|
|
244
|
+
ai244
|
|
245
|
+
ai245
|
|
246
|
+
ai246
|
|
247
|
+
ai247
|
|
248
|
+
ai248
|
|
249
|
+
ai249
|
|
250
|
+
ai250
|
|
251
|
+
ai251
|
|
252
|
+
ai252
|
|
253
|
+
ai253
|
|
254
|
+
ai254
|
|
255
|
+
ai255
|
|
256
|
+
ai256
|
|
257
|
+
ai257
|
|
258
|
+
ai258
|
|
259
|
+
ai259
|
|
260
|
+
ai260
|
|
261
|
+
ai261
|
|
262
|
+
ai262
|
|
263
|
+
ai263
|
|
264
|
+
ai264
|
|
265
|
+
ai265
|
|
266
|
+
ai266
|
|
267
|
+
ai267
|
|
268
|
+
ai268
|
|
269
|
+
ai269
|
|
270
|
+
ai270
|
|
271
|
+
ai271
|
|
272
|
+
ai272
|
|
273
|
+
ai273
|
|
274
|
+
ai274
|
|
275
|
+
ai275
|
|
276
|
+
ai276
|
|
277
|
+
ai277
|
|
278
|
+
ai278
|
|
279
|
+
ai279
|
|
280
|
+
ai280
|
|
281
|
+
ai281
|
|
282
|
+
ai282
|
|
283
|
+
ai283
|
|
284
|
+
ai284
|
|
285
|
+
ai285
|
|
286
|
+
ai286
|
|
287
|
+
ai287
|
|
288
|
+
ai288
|
|
289
|
+
ai289
|
|
290
|
+
ai290
|
|
291
|
+
ai291
|
|
292
|
+
ai292
|
|
293
|
+
ai293
|
|
294
|
+
ai294
|
|
295
|
+
ai295
|
|
296
|
+
ai296
|
|
297
|
+
ai297
|
|
298
|
+
ai298
|
|
299
|
+
ai299
|
|
300
|
+
ai300
|
|
301
|
+
ai301
|
|
302
|
+
ai302
|
|
303
|
+
ai303
|
|
304
|
+
ai304
|
|
305
|
+
ai305
|
|
306
|
+
ai306
|
|
307
|
+
ai307
|
|
308
|
+
ai308
|
|
309
|
+
ai309
|
|
310
|
+
ai310
|
|
311
|
+
ai311
|
|
312
|
+
ai312
|
|
313
|
+
ai313
|
|
314
|
+
ai314
|
|
315
|
+
ai315
|
|
316
|
+
ai316
|
|
317
|
+
ai317
|
|
318
|
+
ai318
|
|
319
|
+
ai319
|
|
320
|
+
ai320
|
|
321
|
+
ai321
|
|
322
|
+
ai322
|
|
323
|
+
ai323
|
|
324
|
+
ai324
|
|
325
|
+
ai325
|
|
326
|
+
ai326
|
|
327
|
+
ai327
|
|
328
|
+
ai328
|
|
329
|
+
ai329
|
|
330
|
+
ai330
|
|
331
|
+
ai331
|
|
332
|
+
ai332
|
|
333
|
+
ai333
|
|
334
|
+
ai334
|
|
335
|
+
ai335
|
|
336
|
+
ai336
|
|
337
|
+
ai337
|
|
338
|
+
ai338
|
|
339
|
+
ai339
|
|
340
|
+
ai340
|
|
341
|
+
ai341
|
|
342
|
+
ai342
|
|
343
|
+
ai343
|
|
344
|
+
ai344
|
|
345
|
+
ai345
|
|
346
|
+
ai346
|
|
347
|
+
ai347
|
|
348
|
+
ai348
|
|
349
|
+
ai349
|
|
350
|
+
ai350
|
|
351
|
+
ai351
|
|
352
|
+
ai352
|
|
353
|
+
ai353
|
|
354
|
+
ai354
|
|
355
|
+
ai355
|
|
356
|
+
ai356
|
|
357
|
+
ai357
|
|
358
|
+
ai358
|
|
359
|
+
ai359
|
|
360
|
+
ai360
|
|
361
|
+
ai361
|
|
362
|
+
ai362
|
|
363
|
+
ai363
|
|
364
|
+
ai364
|
|
365
|
+
ai365
|
|
366
|
+
ai366
|
|
367
|
+
ai367
|
|
368
|
+
ai368
|
|
369
|
+
ai369
|
|
370
|
+
ai370
|
|
371
|
+
ai371
|
|
372
|
+
ai372
|
|
373
|
+
ai373
|
|
374
|
+
ai374
|
|
375
|
+
ai375
|
|
376
|
+
ai376
|
|
377
|
+
ai377
|
|
378
|
+
ai378
|
|
379
|
+
ai379
|
|
380
|
+
ai380
|
|
381
|
+
ai381
|
|
382
|
+
ai382
|
|
383
|
+
ai383
|
|
384
|
+
ai384
|
|
385
|
+
ai385
|
|
386
|
+
ai386
|
|
387
|
+
ai387
|
|
388
|
+
ai388
|
|
389
|
+
ai389
|
|
390
|
+
ai390
|
|
391
|
+
ai391
|
|
392
|
+
ai392
|
|
393
|
+
ai393
|
|
394
|
+
ai394
|
|
395
|
+
ai395
|
|
396
|
+
ai396
|
|
397
|
+
ai397
|
|
398
|
+
ai398
|
|
399
|
+
ai399
|
|
400
|
+
ai400
|
|
401
|
+
ai401
|
|
402
|
+
ai402
|
|
403
|
+
ai403
|
|
404
|
+
ai404
|
|
405
|
+
ai405
|
|
406
|
+
ai406
|
|
407
|
+
ai407
|
|
408
|
+
ai408
|
|
409
|
+
ai409
|
|
410
|
+
ai410
|
|
411
|
+
ai411
|
|
412
|
+
ai412
|
|
413
|
+
ai413
|
|
414
|
+
ai414
|
|
415
|
+
ai415
|
|
416
|
+
ai416
|
|
417
|
+
ai417
|
|
418
|
+
ai418
|
|
419
|
+
ai419
|
|
420
|
+
ai420
|
|
421
|
+
ai421
|
|
422
|
+
ai422
|
|
423
|
+
ai423
|
|
424
|
+
ai424
|
|
425
|
+
ai425
|
|
426
|
+
ai426
|
|
427
|
+
ai427
|
|
428
|
+
ai428
|
|
429
|
+
ai429
|
|
430
|
+
ai430
|
|
431
|
+
ai431
|
|
432
|
+
ai432
|
|
433
|
+
ai433
|
|
434
|
+
ai434
|
|
435
|
+
ai435
|
|
436
|
+
ai436
|
|
437
|
+
ai437
|
|
438
|
+
ai438
|
|
439
|
+
ai439
|
|
440
|
+
ai440
|
|
441
|
+
ai441
|
|
442
|
+
ai442
|
|
443
|
+
ai443
|
|
444
|
+
ai444
|
|
445
|
+
ai445
|
|
446
|
+
ai446
|
|
447
|
+
ai447
|
|
448
|
+
ai448
|
|
449
|
+
ai449
|
|
450
|
+
ai450
|
|
451
|
+
ai451
|
|
452
|
+
ai452
|
|
453
|
+
ai453
|
|
454
|
+
ai454
|
|
455
|
+
ai455
|
|
456
|
+
ai456
|
|
457
|
+
ai457
|
|
458
|
+
ai458
|
|
459
|
+
ai459
|
|
460
|
+
ai460
|
|
461
|
+
ai461
|
|
462
|
+
ai462
|
|
463
|
+
ai463
|
|
464
|
+
ai464
|
|
465
|
+
ai465
|
|
466
|
+
ai466
|
|
467
|
+
ai467
|
|
468
|
+
ai468
|
|
469
|
+
ai469
|
|
470
|
+
ai470
|
|
471
|
+
ai471
|
|
472
|
+
ai472
|
|
473
|
+
ai473
|
|
474
|
+
ai474
|
|
475
|
+
ai475
|
|
476
|
+
ai476
|
|
477
|
+
ai477
|
|
478
|
+
ai478
|
|
479
|
+
ai479
|
|
480
|
+
ai480
|
|
481
|
+
ai481
|
|
482
|
+
ai482
|
|
483
|
+
ai483
|
|
484
|
+
ai484
|
|
485
|
+
ai485
|
|
486
|
+
ai486
|
|
487
|
+
ai487
|
|
488
|
+
ai488
|
|
489
|
+
ai489
|
|
490
|
+
ai490
|
|
491
|
+
ai491
|
|
492
|
+
ai492
|
|
493
|
+
ai493
|
|
494
|
+
ai494
|
|
495
|
+
ai495
|
|
496
|
+
ai496
|
|
497
|
+
ai497
|
|
498
|
+
ai498
|
|
499
|
+
ai499
|
|
500
|
+
ai500
|
|
501
|
+
ai501
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
<application>
|
|
17
17
|
<service
|
|
18
|
+
android:protectionLevel="signature"
|
|
18
19
|
android:name="com.reactlibrary.NotificationEventService"
|
|
19
20
|
android:exported="false">
|
|
20
21
|
<intent-filter>
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
</service>
|
|
24
25
|
|
|
25
26
|
<receiver
|
|
27
|
+
android:protectionLevel="signature"
|
|
26
28
|
android:name="com.reactlibrary.CampaignCampsReceiver"
|
|
27
29
|
android:exported="false">
|
|
28
30
|
<intent-filter>
|
|
@@ -43,6 +45,7 @@
|
|
|
43
45
|
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
|
|
44
46
|
|
|
45
47
|
<activity
|
|
48
|
+
android:protectionLevel="signature"
|
|
46
49
|
android:name="semusi.context.ui.AppICENotifUI"
|
|
47
50
|
android:exported="false">
|
|
48
51
|
<intent-filter>
|
|
@@ -117,12 +120,14 @@
|
|
|
117
120
|
</receiver>
|
|
118
121
|
|
|
119
122
|
<service
|
|
123
|
+
android:protectionLevel="signature"
|
|
120
124
|
android:name="semusi.ruleengine.pushmanager.NotificationEventService"
|
|
121
125
|
android:permission="android.permission.BIND_JOB_SERVICE"></service>
|
|
122
126
|
<!-- Semusi setup end -->
|
|
123
127
|
<!-- Semusi Job Start -->
|
|
124
128
|
|
|
125
129
|
<receiver
|
|
130
|
+
android:protectionLevel="signature"
|
|
126
131
|
android:name="semusi.context.ui.Carousel.CarouselEventReceiver"
|
|
127
132
|
android:exported="false">
|
|
128
133
|
<intent-filter>
|
|
@@ -133,14 +138,17 @@
|
|
|
133
138
|
|
|
134
139
|
<!--</receiver>-->
|
|
135
140
|
<receiver
|
|
141
|
+
android:protectionLevel="signature"
|
|
136
142
|
android:name="semusi.geofencing.AIGeofenceReceiver"
|
|
137
143
|
android:exported="false"></receiver>
|
|
138
144
|
|
|
139
145
|
<receiver
|
|
146
|
+
android:protectionLevel="signature"
|
|
140
147
|
android:name="semusi.geofencing.LocationUpdateReceiver"
|
|
141
148
|
android:exported="false"></receiver>
|
|
142
149
|
|
|
143
150
|
<receiver
|
|
151
|
+
android:protectionLevel="signature"
|
|
144
152
|
android:name="semusi.geofencing.AIGeofenceBootReceiver"
|
|
145
153
|
android:exported="false">
|
|
146
154
|
<intent-filter>
|
|
@@ -148,6 +156,9 @@
|
|
|
148
156
|
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
|
149
157
|
</intent-filter>
|
|
150
158
|
</receiver>
|
|
151
|
-
<receiver
|
|
159
|
+
<receiver
|
|
160
|
+
android:exported="false"
|
|
161
|
+
android:protectionLevel="signature"
|
|
162
|
+
android:name="semusi.geofencing.GeofenceReceiver" />
|
|
152
163
|
</application>
|
|
153
164
|
</manifest>
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
package com.reactlibrary;
|
|
2
2
|
|
|
3
|
-
import android.content.Context;
|
|
4
|
-
|
|
5
3
|
import com.facebook.react.bridge.Arguments;
|
|
6
|
-
import com.facebook.react.bridge.Callback;
|
|
7
4
|
import com.facebook.react.bridge.ReadableArray;
|
|
8
5
|
import com.facebook.react.bridge.ReadableMap;
|
|
9
6
|
import com.facebook.react.bridge.ReadableMapKeySetIterator;
|
|
@@ -16,13 +13,12 @@ import java.util.HashMap;
|
|
|
16
13
|
import java.util.Iterator;
|
|
17
14
|
import java.util.Map;
|
|
18
15
|
|
|
19
|
-
import org.json.JSONException;
|
|
20
16
|
import org.json.JSONObject;
|
|
21
17
|
|
|
22
18
|
import semusi.context.ui.appInbox.AppICEInboxMessage;
|
|
23
|
-
import semusi.
|
|
19
|
+
import semusi.model.campaign.Campaign;
|
|
20
|
+
import semusi.model.user.User;
|
|
24
21
|
|
|
25
|
-
import semusi.nativedisplay.Campaign;
|
|
26
22
|
|
|
27
23
|
public class AppICEUtils {
|
|
28
24
|
private static final String TAG = "AppICEUtils";
|
|
@@ -47,7 +43,7 @@ public class AppICEUtils {
|
|
|
47
43
|
return inboxObject;
|
|
48
44
|
}
|
|
49
45
|
|
|
50
|
-
|
|
46
|
+
/**
|
|
51
47
|
* This method accept object of native Campaign class (semusi.nativedisplay.Campaign)
|
|
52
48
|
* and convert to WritableMap for hybrid side
|
|
53
49
|
*
|
|
@@ -61,20 +57,20 @@ public class AppICEUtils {
|
|
|
61
57
|
campaignMap.putString(EnumConstants.CAMP_ID.getValue(), campaign.getCampId());
|
|
62
58
|
campaignMap.putString(EnumConstants.ACTION_URL.getValue(), campaign.getActionUrl());
|
|
63
59
|
campaignMap.putString(EnumConstants.ACTION_TYPE.getValue(), campaign.getActionType());
|
|
64
|
-
|
|
65
|
-
JSONObject cdata = campaign.
|
|
60
|
+
|
|
61
|
+
JSONObject cdata = campaign.getCustomDataObject();
|
|
66
62
|
Map<String, Object> customDataMap = new HashMap<>();
|
|
67
63
|
Iterator<String> keys = cdata.keys();
|
|
68
|
-
|
|
64
|
+
|
|
69
65
|
while (keys.hasNext()) {
|
|
70
66
|
String key = keys.next();
|
|
71
67
|
customDataMap.put(key, cdata.getString(key));
|
|
72
68
|
}
|
|
73
|
-
|
|
69
|
+
|
|
74
70
|
campaignMap.putMap(EnumConstants.CUSTOMDATA.getValue(), toWritableMap(customDataMap));
|
|
75
71
|
}
|
|
76
72
|
} catch (Throwable e) {
|
|
77
|
-
|
|
73
|
+
|
|
78
74
|
}
|
|
79
75
|
return campaignMap;
|
|
80
76
|
}
|
|
@@ -109,7 +105,7 @@ public class AppICEUtils {
|
|
|
109
105
|
return userObject;
|
|
110
106
|
}
|
|
111
107
|
|
|
112
|
-
|
|
108
|
+
|
|
113
109
|
|
|
114
110
|
public static WritableMap toWritableMap(Map<String, Object> map) {
|
|
115
111
|
WritableMap writableMap = Arguments.createMap();
|
|
@@ -270,10 +266,10 @@ public class AppICEUtils {
|
|
|
270
266
|
return jsonObject;
|
|
271
267
|
}
|
|
272
268
|
|
|
273
|
-
|
|
269
|
+
|
|
274
270
|
|
|
275
271
|
public static void printLog(String TAG, String message) {
|
|
276
272
|
System.out.println(TAG + ", " + message);
|
|
277
273
|
}
|
|
278
|
-
|
|
274
|
+
|
|
279
275
|
}
|
|
@@ -23,10 +23,13 @@ import android.os.Handler;
|
|
|
23
23
|
import semusi.activitysdk.Api;
|
|
24
24
|
import semusi.activitysdk.ContextSdk;
|
|
25
25
|
import semusi.activitysdk.SdkConfig;
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
import semusi.context.ui.appInbox.AppICEInboxMessage;
|
|
28
28
|
import semusi.context.ui.appInbox.IAppICESuccessCallback;
|
|
29
29
|
import semusi.activitysdk.IAppICEDataCallback;
|
|
30
|
+
import semusi.model.campaign.Campaign;
|
|
31
|
+
import semusi.model.user.User;
|
|
32
|
+
|
|
30
33
|
import java.util.*;
|
|
31
34
|
|
|
32
35
|
|
|
@@ -42,12 +45,11 @@ import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
|
42
45
|
import org.json.JSONException;
|
|
43
46
|
import org.json.JSONObject;
|
|
44
47
|
|
|
45
|
-
import semusi.nativedisplay.Campaign;
|
|
46
48
|
|
|
47
49
|
public class AppIceReactPluginModule extends ReactContextBaseJavaModule {
|
|
48
50
|
private static ReactApplicationContext context = null;
|
|
49
51
|
private static final String TAG = "AppIceReactPlugin";
|
|
50
|
-
|
|
52
|
+
|
|
51
53
|
public AppIceReactPluginModule(ReactApplicationContext reactContext) {
|
|
52
54
|
super(reactContext);
|
|
53
55
|
context = reactContext;
|
|
@@ -261,8 +263,8 @@ public class AppIceReactPluginModule extends ReactContextBaseJavaModule {
|
|
|
261
263
|
}
|
|
262
264
|
} catch (Exception e) {
|
|
263
265
|
AppICEUtils.printLog(TAG, "setEducationType: edt issue " + e.getMessage());
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
+
}
|
|
267
|
+
|
|
266
268
|
|
|
267
269
|
try {
|
|
268
270
|
if (map.containsKey(EnumConstants.APPICE_USER_GENDER.getValue())) {
|
|
@@ -355,7 +357,7 @@ public class AppIceReactPluginModule extends ReactContextBaseJavaModule {
|
|
|
355
357
|
Context context = getReactApplicationContext();
|
|
356
358
|
callback.invoke(ContextSdk.getUserId(context));
|
|
357
359
|
}
|
|
358
|
-
|
|
360
|
+
|
|
359
361
|
/**
|
|
360
362
|
* Get appinbox cData through mediakey
|
|
361
363
|
* mediakey is a kind of key just like in json we find key value
|
|
@@ -468,7 +470,7 @@ public class AppIceReactPluginModule extends ReactContextBaseJavaModule {
|
|
|
468
470
|
callback.invoke(e.getMessage());
|
|
469
471
|
}
|
|
470
472
|
}
|
|
471
|
-
|
|
473
|
+
/**
|
|
472
474
|
* This method is to get user details from the given user id
|
|
473
475
|
* this method takes user id in form of Array and return User class objects and return them
|
|
474
476
|
* from callback
|
|
@@ -519,7 +521,7 @@ public class AppIceReactPluginModule extends ReactContextBaseJavaModule {
|
|
|
519
521
|
} catch (Throwable e) {
|
|
520
522
|
callback.invoke(e.getMessage());
|
|
521
523
|
}
|
|
522
|
-
|
|
524
|
+
|
|
523
525
|
}
|
|
524
526
|
/**
|
|
525
527
|
* Get inbox messages count.
|
|
@@ -765,7 +767,7 @@ public class AppIceReactPluginModule extends ReactContextBaseJavaModule {
|
|
|
765
767
|
}
|
|
766
768
|
catch(Throwable e){
|
|
767
769
|
callback.invoke(e.getMessage());
|
|
768
|
-
}
|
|
770
|
+
}
|
|
769
771
|
}
|
|
770
772
|
|
|
771
773
|
@ReactMethod
|