@blueconic/blueconic-react-native 3.2.3 → 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/CHANGELOG.md +24 -0
- package/android/build.gradle +25 -6
- package/android/src/main/java/com/blueconic/reactnative/BlueConicClientModule.java +1737 -1035
- package/android/src/main/java/com/blueconic/reactnative/BlueConicClientPackage.java +1 -0
- package/android/src/main/java/com/blueconic/reactnative/BlueConicInteraction.java +5 -4
- package/android/src/test/java/com/blueconic/reactnative/BlueConicTests.kt +649 -0
- package/android/src/test/java/com/blueconic/reactnative/utils/MockCallback.kt +8 -0
- package/android/src/test/java/com/blueconic/reactnative/utils/MockPromise.kt +39 -0
- package/android/src/test/java/com/blueconic/reactnative/utils/MockReadableArray.kt +58 -0
- package/android/src/test/java/com/blueconic/reactnative/utils/MockReadableMap.kt +65 -0
- package/android/src/test/java/com/blueconic/reactnative/utils/MockWritableArray.kt +92 -0
- package/android/src/test/java/com/blueconic/reactnative/utils/MockWritableMap.kt +158 -0
- package/index.js +60 -2
- package/ios/BlueConicClient-Bridging-Header.h +1 -1
- package/ios/BlueConicClient.xcodeproj/project.pbxproj +6 -269
- package/ios/BlueConicClientModule.m +59 -33
- package/ios/BlueConicClientModule.swift +328 -84
- package/package.json +3 -3
|
@@ -1,1049 +1,1751 @@
|
|
|
1
|
-
|
|
2
1
|
package com.blueconic.reactnative;
|
|
3
2
|
|
|
4
3
|
import android.app.Activity;
|
|
4
|
+
import android.app.Application;
|
|
5
|
+
import android.os.Bundle;
|
|
5
6
|
import android.os.Handler;
|
|
6
7
|
import android.os.Looper;
|
|
8
|
+
import android.os.Parcelable;
|
|
7
9
|
import android.util.Log;
|
|
8
|
-
|
|
10
|
+
import com.blueconic.BlueConicClient;
|
|
11
|
+
import com.blueconic.Segment;
|
|
9
12
|
import com.blueconic.impl.BlueConicClientImpl;
|
|
10
|
-
import com.
|
|
11
|
-
|
|
12
|
-
import com.
|
|
13
|
-
import com.
|
|
14
|
-
import com.facebook.react.bridge
|
|
15
|
-
import com.facebook.react.bridge.Callback;
|
|
16
|
-
import com.facebook.react.bridge.Promise;
|
|
17
|
-
import com.facebook.react.bridge.Arguments;
|
|
18
|
-
import com.facebook.react.bridge.ReadableMap;
|
|
19
|
-
import com.facebook.react.bridge.WritableArray;
|
|
20
|
-
import com.facebook.react.bridge.WritableMap;
|
|
21
|
-
import com.facebook.react.bridge.WritableNativeArray;
|
|
22
|
-
import com.facebook.react.bridge.WritableNativeMap;
|
|
13
|
+
import com.blueconic.impl.configuration.BlueConicConfiguration;
|
|
14
|
+
import com.blueconic.plugin.events.Event;
|
|
15
|
+
import com.blueconic.plugin.events.EventHandler;
|
|
16
|
+
import com.blueconic.plugin.events.PropertiesDialogueEvent;
|
|
17
|
+
import com.facebook.react.bridge.*;
|
|
23
18
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
24
|
-
|
|
25
|
-
import java.util.*;
|
|
19
|
+
import org.jetbrains.annotations.NotNull;
|
|
26
20
|
|
|
27
21
|
import javax.annotation.Nonnull;
|
|
22
|
+
import java.util.*;
|
|
28
23
|
|
|
29
|
-
import com.
|
|
30
|
-
import com.
|
|
31
|
-
import
|
|
32
|
-
import com.blueconic.plugin.events.BlueConicEventManager;
|
|
33
|
-
import com.blueconic.plugin.events.ClickEvent;
|
|
34
|
-
import com.blueconic.plugin.events.UpdateValuesEvent;
|
|
35
|
-
import com.blueconic.plugin.events.FormSubmitEvent;
|
|
36
|
-
import com.blueconic.plugin.events.UpdateContentEvent;
|
|
37
|
-
import com.blueconic.plugin.events.AdvancedEvent;
|
|
24
|
+
import static com.facebook.react.bridge.Arguments.fromBundle;
|
|
25
|
+
import static com.facebook.react.bridge.Arguments.toList;
|
|
26
|
+
import static java.util.Collections.emptyList;
|
|
38
27
|
|
|
39
28
|
public class BlueConicClientModule extends ReactContextBaseJavaModule {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
29
|
+
private static BlueConicClientModuleHelper helper;
|
|
30
|
+
private final ReactApplicationContext reactContext;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The constructor calls the constructor of the superclass and creates an instance of
|
|
34
|
+
* the BlueConicClientModuleHelper class which is referred to by a static instance variable. This helper stores the
|
|
35
|
+
* reactContext, making it available for use by the static publishReceivedParametersEvent method.
|
|
36
|
+
*
|
|
37
|
+
* @param reactContext The application context.
|
|
38
|
+
*/
|
|
39
|
+
public BlueConicClientModule(ReactApplicationContext reactContext) {
|
|
40
|
+
super(reactContext);
|
|
41
|
+
this.reactContext = reactContext;
|
|
42
|
+
helper = new BlueConicClientModuleHelper(reactContext);
|
|
43
|
+
|
|
44
|
+
// Delayed plugin class register due to availability of activity context
|
|
45
|
+
getHandler().postDelayed(() -> {
|
|
46
|
+
BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
47
|
+
if (blueConicClient != null) {
|
|
48
|
+
blueConicClient.registerPluginClass(BlueConicInteraction.class, "BlueConicClient.BlueConicInteraction");
|
|
49
|
+
}
|
|
50
|
+
}, 2000);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The superclass ReactContextBaseJavaModule requires that the getName method is implemented.
|
|
55
|
+
* The purpose of this method is to return the name of the Native Module which represents this class in JavaScript.
|
|
56
|
+
* Hence, this method allows us to access the native module through NativeModules.BlueConic in JavaScript.
|
|
57
|
+
*
|
|
58
|
+
* @return String representing the name of this module.
|
|
59
|
+
*/
|
|
60
|
+
@Override
|
|
61
|
+
public String getName() {
|
|
62
|
+
return "BlueConicClient";
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@ReactMethod
|
|
66
|
+
public void initialize(@Nonnull ReadableMap readableMap, @Nonnull Callback callback) {
|
|
67
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
68
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
69
|
+
|
|
70
|
+
BlueConicConfiguration configuration = new BlueConicConfiguration.Builder()
|
|
71
|
+
.setHostName((String)Objects.requireNonNull(properties.get("bc_hostname")))
|
|
72
|
+
.setDebugMode((Boolean)Objects.requireNonNull(properties.get("bc_debug")))
|
|
73
|
+
.build((Application) getReactApplicationContext().getApplicationContext());
|
|
74
|
+
|
|
75
|
+
if (properties.containsKey("override_app_id") && properties.get("override_app_id") != null) {
|
|
76
|
+
configuration.setAppID((String) properties.get("override_app_id"));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (properties.containsKey("simulator_username") && properties.get("simulator_username") != null
|
|
80
|
+
&& properties.containsKey("simulator_session_id") && properties.get("simulator_session_id") != null) {
|
|
81
|
+
configuration.setSimulatorUsername((String) properties.get("simulator_username"));
|
|
82
|
+
configuration.setSimulatorMobileSessionId((String) properties.get("simulator_session_id"));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (blueConicClient != null) {
|
|
86
|
+
getBlueConicClientInstance().initialize(configuration, new com.blueconic.Callback() {
|
|
87
|
+
@Override
|
|
88
|
+
public void onSuccess() {
|
|
89
|
+
callback.invoke(true, null);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@Override
|
|
93
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
94
|
+
callback.invoke(false, error.toString());
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Enable and disable the BlueConicClient to prevent or re-activate tracking data.
|
|
102
|
+
*
|
|
103
|
+
* @param isEnabled to enable or disable the BlueConicClient.
|
|
104
|
+
*/
|
|
105
|
+
@ReactMethod
|
|
106
|
+
public void setEnabled(@Nonnull Boolean isEnabled) {
|
|
107
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
108
|
+
if (blueConicClient != null) {
|
|
109
|
+
blueConicClient.setEnabled(isEnabled);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Return {@code true} if the BlueConicClient enabled. The value is passed to the provided callback function as separated Strings.
|
|
116
|
+
*
|
|
117
|
+
* @param promise The promise to handle the obtained value. Promises are necessary in Native Modules
|
|
118
|
+
* to pass values back to the JavaScript.
|
|
119
|
+
*/
|
|
120
|
+
@ReactMethod
|
|
121
|
+
public void isEnabledAsync(@Nonnull Promise promise) {
|
|
122
|
+
final WritableArray result = getWritableArray();
|
|
123
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
124
|
+
|
|
125
|
+
if (blueConicClient != null) {
|
|
126
|
+
result.pushBoolean(blueConicClient.isEnabled());
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
promise.resolve(result);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Return {@code true} if the BlueConicClient enabled. The value is passed to the provided callback function as seperated Strings
|
|
134
|
+
*
|
|
135
|
+
* @param callback The callback function to handle the obtained value. Callbacks are necessary in
|
|
136
|
+
* Native Modules to pass values back to the JavaScript.
|
|
137
|
+
*/
|
|
138
|
+
@ReactMethod
|
|
139
|
+
public void isEnabledWithCallback(@Nonnull Callback callback) {
|
|
140
|
+
final List<Boolean> result = new ArrayList<Boolean>();
|
|
141
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
142
|
+
|
|
143
|
+
if (blueConicClient != null) {
|
|
144
|
+
result.add(blueConicClient.isEnabled());
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
callback.invoke(result);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Gets the ID of the BlueConic profile. The value is passed to the provided Promise as a String.
|
|
152
|
+
*
|
|
153
|
+
* @param promise The promise to handle the obtained value. Promises are necessary in Native Modules
|
|
154
|
+
* to pass values back to the JavaScript.
|
|
155
|
+
*/
|
|
156
|
+
@ReactMethod
|
|
157
|
+
public void getProfileIdAsync(@Nonnull Promise promise) {
|
|
158
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
159
|
+
String profileId = "";
|
|
160
|
+
if (blueConicClient != null) {
|
|
161
|
+
profileId = blueConicClient.getProfileId();
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
promise.resolve(profileId);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Gets the ID of the BlueConic profile. The value is passed to the provided callback function as a String.
|
|
169
|
+
*
|
|
170
|
+
* @param callback The Callback function to handle the obtained value. Callbacks are necessary in Native Modules
|
|
171
|
+
* to pass values back to the JavaScript.
|
|
172
|
+
*/
|
|
173
|
+
@ReactMethod
|
|
174
|
+
public void getProfileIdWithCallback(@Nonnull Callback callback) {
|
|
175
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
176
|
+
String profileId = "";
|
|
177
|
+
if (blueConicClient != null) {
|
|
178
|
+
profileId = blueConicClient.getProfileId();
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
callback.invoke(profileId);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Resets the BlueConic profile id. This will generate a new profile id for the current user.
|
|
186
|
+
*/
|
|
187
|
+
@ReactMethod
|
|
188
|
+
public void clearProfileId(@Nonnull Callback callback) {
|
|
189
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
190
|
+
if (blueConicClient != null) {
|
|
191
|
+
blueConicClient.clearProfileId(new com.blueconic.Callback() {
|
|
192
|
+
@Override
|
|
193
|
+
public void onSuccess() {
|
|
194
|
+
callback.invoke(true, null);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@Override
|
|
198
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
199
|
+
callback.invoke(false, error.toString());
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Returns the current screen name.
|
|
207
|
+
*
|
|
208
|
+
* @param promise The promise to handle the obtained value. Promises are necessary in Native Modules
|
|
209
|
+
* to pass values back to the JavaScript.
|
|
210
|
+
*/
|
|
211
|
+
@ReactMethod
|
|
212
|
+
public void getScreenNameAsync(@Nonnull Promise promise) {
|
|
213
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
214
|
+
String screenName = "";
|
|
215
|
+
if (blueConicClient != null) {
|
|
216
|
+
screenName = blueConicClient.getScreenName();
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
promise.resolve(screenName);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Returns the current screen name.
|
|
224
|
+
*
|
|
225
|
+
* @param callback The callback function to handle the obtained value. Callbacks are necessary in Native Modules
|
|
226
|
+
* to pass values back to the JavaScript.
|
|
227
|
+
*/
|
|
228
|
+
@ReactMethod
|
|
229
|
+
public void getScreenNameWithCallback(@Nonnull Callback callback) {
|
|
230
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
231
|
+
String screenName = "";
|
|
232
|
+
if (blueConicClient != null) {
|
|
233
|
+
screenName = blueConicClient.getScreenName();
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
callback.invoke(screenName);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Gets the values of the specified profile property. The values are passed to the provided promise
|
|
241
|
+
* as separate Strings.
|
|
242
|
+
*
|
|
243
|
+
* @param property The profile property for which to get the values.
|
|
244
|
+
* @param promise The Promise to handle the obtained values. Promises are necessary in Native Modules
|
|
245
|
+
* to pass values back to the JavaScript.
|
|
246
|
+
*/
|
|
247
|
+
@ReactMethod
|
|
248
|
+
public void getProfileValueAsync(@Nonnull String property, @Nonnull Promise promise) {
|
|
249
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
250
|
+
final WritableArray result = getWritableArray();
|
|
251
|
+
|
|
252
|
+
if (blueConicClient != null) {
|
|
253
|
+
result.pushString(blueConicClient.getProfileValue(property));
|
|
254
|
+
}
|
|
255
|
+
promise.resolve(result);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Gets the values of the specified profile property. The values are passed to the provided promise
|
|
260
|
+
* as separate Strings.
|
|
261
|
+
*
|
|
262
|
+
* @param property The profile property for which to get the values.
|
|
263
|
+
* @param promise The Promise to handle the obtained values. Promises are necessary in Native Modules
|
|
264
|
+
* to pass values back to the JavaScript.
|
|
265
|
+
*/
|
|
266
|
+
@ReactMethod
|
|
267
|
+
public void getProfileValuesAsync(@Nonnull String property, @Nonnull Promise promise) {
|
|
268
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
269
|
+
final WritableArray result = getWritableArray();
|
|
270
|
+
|
|
271
|
+
if (blueConicClient != null) {
|
|
272
|
+
Collection<String> values = blueConicClient.getProfileValues(property);
|
|
273
|
+
result.pushArray(fromList(new ArrayList<>(values)));
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
promise.resolve(result);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Gets the values of the specified profile property. The values are passed to the provided callback function
|
|
281
|
+
* as separate Strings.
|
|
282
|
+
*
|
|
283
|
+
* @param property The profile property for which to get the values.
|
|
284
|
+
* @param callback The Callback function to handle the obtained values. Callbacks are necessary in Native Modules
|
|
285
|
+
* to pass values back to the JavaScript.
|
|
286
|
+
*/
|
|
287
|
+
@ReactMethod
|
|
288
|
+
public void getProfileValueWithCallback(@Nonnull String property, @Nonnull Callback callback) {
|
|
289
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
290
|
+
final WritableArray result = getWritableArray();
|
|
291
|
+
|
|
292
|
+
if (blueConicClient != null) {
|
|
293
|
+
result.pushString(blueConicClient.getProfileValue(property));
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
callback.invoke(result);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Gets the values of the specified profile property. The values are passed to the provided callback function
|
|
301
|
+
* as separate Strings.
|
|
302
|
+
*
|
|
303
|
+
* @param property The profile property for which to get the values.
|
|
304
|
+
* @param callback The Callback function to handle the obtained values. Callbacks are necessary in Native Modules
|
|
305
|
+
* to pass values back to the JavaScript.
|
|
306
|
+
*/
|
|
307
|
+
@ReactMethod
|
|
308
|
+
public void getProfileValuesWithCallback(@Nonnull String property, @Nonnull Callback callback) {
|
|
309
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
310
|
+
final WritableArray result = getWritableArray();
|
|
311
|
+
|
|
312
|
+
if (blueConicClient != null) {
|
|
313
|
+
Collection<String> values = blueConicClient.getProfileValues(property);
|
|
314
|
+
result.pushArray(fromList(new ArrayList<>(values)));
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
callback.invoke(result);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Retrieves all the profile properties and their values.
|
|
322
|
+
*
|
|
323
|
+
* @param promise The promise to handle the obtained value. Promises are necessary in Native Modules
|
|
324
|
+
*/
|
|
325
|
+
@ReactMethod
|
|
326
|
+
public void getAllProfilePropertiesAsync(@Nonnull Promise promise) {
|
|
327
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
328
|
+
final WritableArray result = getWritableArray();
|
|
329
|
+
|
|
330
|
+
if (blueConicClient == null) {
|
|
331
|
+
promise.resolve(result);
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
BlueConicClientImpl implInstance = (BlueConicClientImpl) blueConicClient;
|
|
335
|
+
|
|
336
|
+
for (String propertyName : implInstance.getProfilePropertyNames()) {
|
|
337
|
+
final WritableMap item = getWritableMap();
|
|
338
|
+
item.putString("id", propertyName);
|
|
339
|
+
Collection<String> values = blueConicClient.getProfileValues(propertyName);
|
|
340
|
+
String joinedValues = String.join(",", values);
|
|
341
|
+
item.putString("value", joinedValues);
|
|
342
|
+
result.pushMap(item);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
promise.resolve(result);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Gets the privacy legislation. The values are passed to the provided promise
|
|
350
|
+
* as separate String.
|
|
351
|
+
*
|
|
352
|
+
* @param promise The Promise to handle the obtained values. Promises are necessary in Native Modules
|
|
353
|
+
* to pass values back to the JavaScript.
|
|
354
|
+
*/
|
|
355
|
+
@ReactMethod
|
|
356
|
+
public void getPrivacyLegislationAsync(@Nonnull Promise promise) {
|
|
357
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
358
|
+
final WritableArray result = getWritableArray();
|
|
359
|
+
|
|
360
|
+
if (blueConicClient != null) {
|
|
361
|
+
result.pushString(blueConicClient.getPrivacyLegislation());
|
|
362
|
+
}
|
|
363
|
+
promise.resolve(result);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Gets the privacy legislation. The values are passed to the provided callback function
|
|
368
|
+
* as separate String.
|
|
369
|
+
*
|
|
370
|
+
* @param callback The Callback function to handle the obtained values. Callbacks are necessary in Native Modules
|
|
371
|
+
* to pass values back to the JavaScript.
|
|
372
|
+
*/
|
|
373
|
+
@ReactMethod
|
|
374
|
+
public void getPrivacyLegislationWithCallback(@Nonnull Callback callback) {
|
|
375
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
376
|
+
final WritableArray result = getWritableArray();
|
|
377
|
+
|
|
378
|
+
if (blueConicClient != null) {
|
|
379
|
+
result.pushString(blueConicClient.getPrivacyLegislation());
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
callback.invoke(result);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Gets the consented objectives. The values are passed to the provided promise
|
|
387
|
+
* as separate Strings.
|
|
388
|
+
*
|
|
389
|
+
* @param promise The Promise to handle the obtained values. Promises are necessary in Native Modules
|
|
390
|
+
* to pass values back to the JavaScript.
|
|
391
|
+
*/
|
|
392
|
+
@ReactMethod
|
|
393
|
+
public void getConsentedObjectivesAsync(@Nonnull Promise promise) {
|
|
394
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
395
|
+
final WritableArray result = getWritableArray();
|
|
396
|
+
|
|
397
|
+
if (blueConicClient != null) {
|
|
398
|
+
Collection<String> values = blueConicClient.getConsentedObjectives();
|
|
399
|
+
result.pushArray(fromList(new ArrayList<>(values)));
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
promise.resolve(result);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* Gets the consented objectives. The values are passed to the provided callback function
|
|
407
|
+
* as separate Strings.
|
|
408
|
+
*
|
|
409
|
+
* @param callback The Callback function to handle the obtained values. Callbacks are necessary in Native Modules
|
|
410
|
+
* to pass values back to the JavaScript.
|
|
411
|
+
*/
|
|
412
|
+
@ReactMethod
|
|
413
|
+
public void getConsentedObjectivesWithCallback(@Nonnull Callback callback) {
|
|
414
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
415
|
+
final WritableArray result = getWritableArray();
|
|
416
|
+
|
|
417
|
+
if (blueConicClient != null) {
|
|
418
|
+
Collection<String> values = blueConicClient.getConsentedObjectives();
|
|
419
|
+
result.pushArray(fromList(new ArrayList<>(values)));
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
callback.invoke(result);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Gets the refused objectives. The values are passed to the provided promise
|
|
427
|
+
* as separate Strings.
|
|
428
|
+
*
|
|
429
|
+
* @param promise The Promise to handle the obtained values. Promises are necessary in Native Modules
|
|
430
|
+
* to pass values back to the JavaScript.
|
|
431
|
+
*/
|
|
432
|
+
@ReactMethod
|
|
433
|
+
public void getRefusedObjectivesAsync(@Nonnull Promise promise) {
|
|
434
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
435
|
+
final WritableArray result = getWritableArray();
|
|
436
|
+
|
|
437
|
+
if (blueConicClient != null) {
|
|
438
|
+
Collection<String> values = blueConicClient.getRefusedObjectives();
|
|
439
|
+
result.pushArray(fromList(new ArrayList<>(values)));
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
promise.resolve(result);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Gets the refused objectives. The values are passed to the provided callback function
|
|
447
|
+
* as separate Strings.
|
|
448
|
+
*
|
|
449
|
+
* @param callback The Callback function to handle the obtained values. Callbacks are necessary in Native Modules
|
|
450
|
+
* to pass values back to the JavaScript.
|
|
451
|
+
*/
|
|
452
|
+
@ReactMethod
|
|
453
|
+
public void getRefusedObjectivesWithCallback(@Nonnull Callback callback) {
|
|
454
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
455
|
+
final WritableArray result = getWritableArray();
|
|
456
|
+
|
|
457
|
+
if (blueConicClient != null) {
|
|
458
|
+
Collection<String> values = blueConicClient.getRefusedObjectives();
|
|
459
|
+
result.pushArray(fromList(new ArrayList<>(values)));
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
callback.invoke(result);
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Adds an objective to the consented objectives list.
|
|
467
|
+
*
|
|
468
|
+
* @param objectiveId The id of the objective to add to consented objectives.
|
|
469
|
+
*/
|
|
470
|
+
@ReactMethod
|
|
471
|
+
public void addConsentedObjective(@Nonnull String objectiveId) {
|
|
472
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
473
|
+
if (blueConicClient != null) {
|
|
474
|
+
blueConicClient.addConsentedObjective(objectiveId, null);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* Adds an objective to the refused objectives list.
|
|
480
|
+
*
|
|
481
|
+
* @param objectiveId The id of the objective to add to refused objectives.
|
|
482
|
+
*/
|
|
483
|
+
@ReactMethod
|
|
484
|
+
public void addRefusedObjective(@Nonnull String objectiveId) {
|
|
485
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
486
|
+
if (blueConicClient != null) {
|
|
487
|
+
blueConicClient.addRefusedObjective(objectiveId, null);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Set the privacy legislation.
|
|
493
|
+
*
|
|
494
|
+
* @param privacyLegislation The privacy legislation.
|
|
495
|
+
*/
|
|
496
|
+
@ReactMethod
|
|
497
|
+
public void setPrivacyLegislation(@Nonnull String privacyLegislation) {
|
|
498
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
499
|
+
if (blueConicClient != null) {
|
|
500
|
+
blueConicClient.setPrivacyLegislation(privacyLegislation);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Sets the given objectives for consented objectives.
|
|
506
|
+
*
|
|
507
|
+
* @param objectiveIds A ReadableArray containing IDs of Objectives that will be set as the new values for Consented objectives.
|
|
508
|
+
*/
|
|
509
|
+
@ReactMethod
|
|
510
|
+
public void setConsentedObjectives(@Nonnull ReadableArray objectiveIds) {
|
|
511
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
512
|
+
if (blueConicClient != null) {
|
|
513
|
+
blueConicClient.setConsentedObjectives(toList(objectiveIds));
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/**
|
|
518
|
+
* Sets the given objectives for consented objectives.
|
|
519
|
+
*
|
|
520
|
+
* @param objectiveIds A ReadableArray containing IDs of Objectives that will be set as the new values for Consented objectives.
|
|
521
|
+
*/
|
|
522
|
+
@ReactMethod
|
|
523
|
+
public void setRefusedObjectives(@Nonnull ReadableArray objectiveIds) {
|
|
524
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
525
|
+
if (blueConicClient != null) {
|
|
526
|
+
blueConicClient.setRefusedObjectives(toList(objectiveIds));
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Setter for the locale to get the parameters for. By default, the default locale configured in BlueConic is used.
|
|
532
|
+
*
|
|
533
|
+
* @param locale the locale, e.g. 'en_US'.
|
|
534
|
+
*/
|
|
535
|
+
@ReactMethod
|
|
536
|
+
public void setLocale(@Nonnull String locale) {
|
|
537
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
538
|
+
if (blueConicClient != null) {
|
|
539
|
+
blueConicClient.setLocale(locale);
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Gets the segments of the profile.
|
|
545
|
+
* To retrieve and update the Segments you have to register a pageview first.
|
|
546
|
+
* The values are passed to the provided promise
|
|
547
|
+
* as a list of Objects containing id and name.
|
|
548
|
+
*
|
|
549
|
+
* @param promise The Promise to handle the obtained values. Promises are necessary in Native Modules
|
|
550
|
+
* to pass values back to the JavaScript.
|
|
551
|
+
*/
|
|
552
|
+
@ReactMethod
|
|
553
|
+
public void getSegments(@Nonnull Promise promise) {
|
|
554
|
+
promise.resolve(getFormattedSegments());
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Gets the segments of the profile.
|
|
559
|
+
* To retrieve and update the Segments you have to register a pageview first.
|
|
560
|
+
* The values are passed to the provided promise
|
|
561
|
+
* as a list of Objects containing id and name.
|
|
562
|
+
*
|
|
563
|
+
* @param callback The Callback function to handle the obtained values. Callbacks are necessary in Native Modules
|
|
564
|
+
* to pass values back to the JavaScript.
|
|
565
|
+
*/
|
|
566
|
+
@ReactMethod
|
|
567
|
+
public void getSegmentsWithCallback(@Nonnull Callback callback) {
|
|
568
|
+
callback.invoke(getFormattedSegments());
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* Return whether the BlueConic profile is part of the BlueConic segment.
|
|
573
|
+
* The value is passed to the provided callback function as Boolean.
|
|
574
|
+
*
|
|
575
|
+
* @param segmentId The id of the segment
|
|
576
|
+
* @param promise The promise to handle the obtained value. Promises are necessary in Native Modules
|
|
577
|
+
* Native Modules to pass values back to the JavaScript.
|
|
578
|
+
*/
|
|
579
|
+
@ReactMethod
|
|
580
|
+
public void hasSegment(@Nonnull String segmentId, @Nonnull Promise promise) {
|
|
581
|
+
final List<Boolean> result = new ArrayList<Boolean>();
|
|
582
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
583
|
+
|
|
584
|
+
if (blueConicClient != null) {
|
|
585
|
+
result.add(blueConicClient.hasSegment(segmentId));
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
promise.resolve(result);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Return whether the BlueConic profile is part of the BlueConic segment.
|
|
593
|
+
* The value is passed to the provided callback function as Boolean.
|
|
594
|
+
*
|
|
595
|
+
* @param segmentId The id of the segment
|
|
596
|
+
* @param callback The callback function to handle the obtained value. Callbacks are necessary in
|
|
597
|
+
* Native Modules to pass values back to the JavaScript.
|
|
598
|
+
*/
|
|
599
|
+
@ReactMethod
|
|
600
|
+
public void hasSegmentWithCallback(@Nonnull String segmentId, @Nonnull Callback callback) {
|
|
601
|
+
final List<Boolean> result = new ArrayList<Boolean>();
|
|
602
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
603
|
+
|
|
604
|
+
if (blueConicClient != null) {
|
|
605
|
+
result.add(blueConicClient.hasSegment(segmentId));
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
callback.invoke(result);
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Adds the given values to the specified profile property.
|
|
613
|
+
*
|
|
614
|
+
* @param property The profile property to which to add the values.
|
|
615
|
+
* @param value A ReadableArray containing Strings that will be added to the profile property.
|
|
616
|
+
*/
|
|
617
|
+
@ReactMethod
|
|
618
|
+
public void addProfileValue(@Nonnull String property, @Nonnull String value) {
|
|
619
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
620
|
+
if (blueConicClient != null) {
|
|
621
|
+
blueConicClient.addProfileValue(property, value, null);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* Adds the given values to the specified profile property.
|
|
627
|
+
*
|
|
628
|
+
* @param property The profile property to which to add the values.
|
|
629
|
+
* @param values A ReadableArray containing Strings that will be added to the profile property.
|
|
630
|
+
*/
|
|
631
|
+
@ReactMethod
|
|
632
|
+
public void addProfileValues(@Nonnull String property, @Nonnull ReadableArray values) {
|
|
633
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
634
|
+
if (blueConicClient != null) {
|
|
635
|
+
blueConicClient.addProfileValues(property, toList(values), null);
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Set the given value for the specified profile property.
|
|
641
|
+
*
|
|
642
|
+
* @param property The profile property for which to set the values.
|
|
643
|
+
* @param value A ReadableArray containing Strings that will be set as the new values for the profile property.
|
|
644
|
+
*/
|
|
645
|
+
@ReactMethod
|
|
646
|
+
public void setProfileValue(@Nonnull String property, @Nonnull String value) {
|
|
647
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
648
|
+
if (blueConicClient != null) {
|
|
649
|
+
blueConicClient.setProfileValue(property, value, null);
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* Sets the given values for the specified profile property.
|
|
655
|
+
*
|
|
656
|
+
* @param property The profile property for which to set the values.
|
|
657
|
+
* @param values A ReadableArray containing Strings that will be set as the new values for the profile property.
|
|
658
|
+
*/
|
|
659
|
+
@ReactMethod
|
|
660
|
+
public void setProfileValues(@Nonnull String property, @Nonnull ReadableArray values) {
|
|
661
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
662
|
+
if (blueConicClient != null) {
|
|
663
|
+
blueConicClient.setProfileValues(property, toList(values), null);
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* Increments the given values to the specified profile property.
|
|
669
|
+
*
|
|
670
|
+
* @param property The profile property to which to increment the values.
|
|
671
|
+
* @param value A ReadableArray containing Strings that will be incremented to the profile property.
|
|
672
|
+
*/
|
|
673
|
+
@ReactMethod
|
|
674
|
+
public void incrementProfileValue(@Nonnull String property, @Nonnull String value) {
|
|
675
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
676
|
+
if (blueConicClient != null) {
|
|
677
|
+
blueConicClient.incrementProfileValue(property, value, null);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Create Event.
|
|
683
|
+
*
|
|
684
|
+
* @param eventName The name of the event
|
|
685
|
+
* @param readableMap The readable map retrieved from React native
|
|
686
|
+
*/
|
|
687
|
+
@ReactMethod
|
|
688
|
+
public void createEvent(@Nonnull String eventName, ReadableMap readableMap) {
|
|
689
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
690
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
691
|
+
|
|
692
|
+
if (blueConicClient != null) {
|
|
693
|
+
blueConicClient.createEvent(eventName, properties, getCurrentActivity(), null);
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Create Event.
|
|
699
|
+
*
|
|
700
|
+
* @param eventName The name of the event
|
|
701
|
+
* @param readableMap The readable map retrieved from React native
|
|
702
|
+
* @param promise The promise to handle the obtained value. Promises are necessary in Native Modules
|
|
703
|
+
* Native Modules to pass values back to the JavaScript.
|
|
704
|
+
*/
|
|
705
|
+
@ReactMethod
|
|
706
|
+
public void createEventAsync(@Nonnull String eventName, ReadableMap readableMap, @Nonnull final Promise promise) {
|
|
707
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
708
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
709
|
+
|
|
710
|
+
if (blueConicClient != null) {
|
|
711
|
+
blueConicClient.createEvent(eventName, properties, getCurrentActivity(), new com.blueconic.Callback() {
|
|
712
|
+
@Override
|
|
713
|
+
public void onSuccess() {
|
|
714
|
+
promise.resolve(getWritableArray());
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
@Override
|
|
718
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
719
|
+
promise.resolve(getWritableArray());
|
|
720
|
+
}
|
|
721
|
+
});
|
|
722
|
+
} else {
|
|
723
|
+
promise.resolve(getWritableArray());
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* Create Event.
|
|
729
|
+
*
|
|
730
|
+
* @param eventName The name of the event
|
|
731
|
+
* @param readableMap The readable map retrieved from React native
|
|
732
|
+
* @param callback The Callback function to handle the obtained values. Callbacks are necessary in Native Modules
|
|
733
|
+
* to pass values back to the JavaScript.
|
|
734
|
+
*/
|
|
735
|
+
@ReactMethod
|
|
736
|
+
public void createEventWithCallback(@Nonnull String eventName, ReadableMap readableMap, @Nonnull final Callback callback) {
|
|
737
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
738
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
739
|
+
|
|
740
|
+
if (blueConicClient != null) {
|
|
741
|
+
blueConicClient.createEvent(eventName, properties, getCurrentActivity(), new com.blueconic.Callback() {
|
|
742
|
+
@Override
|
|
743
|
+
public void onSuccess() {
|
|
744
|
+
callback.invoke(true, null);
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
@Override
|
|
748
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
749
|
+
callback.invoke(false, error.toString());
|
|
750
|
+
}
|
|
751
|
+
});
|
|
752
|
+
} else {
|
|
753
|
+
callback.invoke(false, "InternalError");
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Update sync the BlueConic Profile
|
|
759
|
+
*/
|
|
760
|
+
@ReactMethod
|
|
761
|
+
public void updateProfile() {
|
|
762
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
763
|
+
|
|
764
|
+
if (blueConicClient != null) {
|
|
765
|
+
blueConicClient.updateProfile(null);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Update sync the BlueConic Profile
|
|
771
|
+
*
|
|
772
|
+
* @param promise The promise to handle the obtained value. Promises are necessary in Native Modules
|
|
773
|
+
* Native Modules to pass values back to the JavaScript.
|
|
774
|
+
*/
|
|
775
|
+
@ReactMethod
|
|
776
|
+
public void updateProfileAsync(@Nonnull final Promise promise) {
|
|
777
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
778
|
+
|
|
779
|
+
if (blueConicClient != null) {
|
|
780
|
+
blueConicClient.updateProfile(new com.blueconic.Callback() {
|
|
781
|
+
@Override
|
|
782
|
+
public void onSuccess() {
|
|
783
|
+
promise.resolve(getWritableArray());
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
@Override
|
|
787
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
788
|
+
promise.resolve(getWritableArray());
|
|
789
|
+
}
|
|
790
|
+
});
|
|
791
|
+
} else {
|
|
792
|
+
promise.resolve(getWritableArray());
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Update the BlueConic Profile with callback
|
|
798
|
+
*
|
|
799
|
+
* @param callback The Callback function to handle the obtained values. Callbacks are necessary in Native Modules
|
|
800
|
+
* to pass values back to the JavaScript.
|
|
801
|
+
*/
|
|
802
|
+
@ReactMethod
|
|
803
|
+
public void updateProfileWithCallback(@Nonnull final Callback callback) {
|
|
804
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
805
|
+
|
|
806
|
+
if (blueConicClient != null) {
|
|
807
|
+
blueConicClient.updateProfile(new com.blueconic.Callback() {
|
|
808
|
+
@Override
|
|
809
|
+
public void onSuccess() {
|
|
810
|
+
callback.invoke(true, null);
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
@Override
|
|
814
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
815
|
+
callback.invoke(false, error.toString());
|
|
816
|
+
}
|
|
817
|
+
});
|
|
818
|
+
} else {
|
|
819
|
+
callback.invoke(false, "InternalError");
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
/**
|
|
824
|
+
* Calls the createEvent method of the BlueConicClient to register a PAGEVIEW event. This must be called on every
|
|
825
|
+
* screen change as it triggers the BlueConic SDK to load all plugins (i.e. listeners, dialogues) for the screen.
|
|
826
|
+
*
|
|
827
|
+
* @param screenName The name of the screen.
|
|
828
|
+
*/
|
|
829
|
+
@ReactMethod
|
|
830
|
+
public void createPageViewEvent(@Nonnull String screenName, ReadableMap readableMap) {
|
|
831
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
832
|
+
if (blueConicClient != null) {
|
|
833
|
+
// blueConicClient instance must have an activity or application
|
|
834
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
835
|
+
Activity activity = getCurrentActivity();
|
|
836
|
+
if (activity == null) {
|
|
837
|
+
activity = new Activity();
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
blueConicClient.createPageViewEvent(screenName, activity, properties, null);
|
|
841
|
+
} else {
|
|
842
|
+
Log.e("BlueConic", "Unable to register a PAGEVIEW-event: Activity not available.");
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* Calls the createEvent method of the BlueConicClient to register a PAGEVIEW event. This must be called on every
|
|
848
|
+
* screen change as it triggers the BlueConic SDK to load all plugins (i.e. listeners, dialogues) for the screen.
|
|
849
|
+
*
|
|
850
|
+
* @param screenName The name of the screen.
|
|
851
|
+
*/
|
|
852
|
+
@ReactMethod
|
|
853
|
+
public void createPageViewEventAsync(@Nonnull String screenName, ReadableMap readableMap, @Nonnull final Promise promise) {
|
|
854
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
855
|
+
if (blueConicClient != null) {
|
|
856
|
+
// blueConicClient instance must have an activity or application
|
|
857
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
858
|
+
Activity activity = getCurrentActivity();
|
|
859
|
+
if (activity == null) {
|
|
860
|
+
activity = new Activity();
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
blueConicClient.createPageViewEvent(screenName, activity, properties, new com.blueconic.Callback() {
|
|
864
|
+
@Override
|
|
865
|
+
public void onSuccess() {
|
|
866
|
+
promise.resolve(getWritableArray());
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
@Override
|
|
870
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
871
|
+
promise.resolve(getWritableArray());
|
|
872
|
+
}
|
|
873
|
+
});
|
|
874
|
+
} else {
|
|
875
|
+
Log.e("BlueConic", "Unable to register a PAGEVIEW-event: Activity not available.");
|
|
876
|
+
promise.resolve(getWritableArray());
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* Calls the createEvent method of the BlueConicClient to register a PAGEVIEW event. This must be called on every
|
|
882
|
+
* screen change as it triggers the BlueConic SDK to load all plugins (i.e. listeners, dialogues) for the screen.
|
|
883
|
+
*
|
|
884
|
+
* @param screenName The name of the screen.
|
|
885
|
+
*/
|
|
886
|
+
@ReactMethod
|
|
887
|
+
public void createPageViewEventWithCallback(@Nonnull String screenName, ReadableMap readableMap, @Nonnull final Callback callback) {
|
|
888
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
889
|
+
if (blueConicClient != null) {
|
|
890
|
+
// blueConicClient instance must have an activity or application
|
|
891
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
892
|
+
Activity activity = getCurrentActivity();
|
|
893
|
+
if (activity == null) {
|
|
894
|
+
activity = new Activity();
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
blueConicClient.createPageViewEvent(screenName, activity, properties, new com.blueconic.Callback() {
|
|
898
|
+
@Override
|
|
899
|
+
public void onSuccess() {
|
|
900
|
+
callback.invoke(true, null);
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
@Override
|
|
904
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
905
|
+
callback.invoke(false, error.toString());
|
|
906
|
+
}
|
|
907
|
+
});
|
|
908
|
+
} else {
|
|
909
|
+
Log.e("BlueConic", "Unable to register a PAGEVIEW-event: Activity not available.");
|
|
910
|
+
callback.invoke(getWritableArray());
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* Create View Event.
|
|
916
|
+
*
|
|
917
|
+
* @param interactionId The type of event
|
|
918
|
+
* @param readableMap The readable map retrieved from React native
|
|
919
|
+
*/
|
|
920
|
+
@ReactMethod
|
|
921
|
+
public void createViewEvent(@Nonnull String interactionId, ReadableMap readableMap) {
|
|
922
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
923
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
924
|
+
|
|
925
|
+
if (blueConicClient != null) {
|
|
926
|
+
Activity activity = getCurrentActivity();
|
|
927
|
+
if (activity == null) {
|
|
928
|
+
activity = new Activity();
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
blueConicClient.createViewEvent(interactionId, properties, activity,null);
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Create View Event.
|
|
937
|
+
*
|
|
938
|
+
* @param interactionId The interaction id of the event
|
|
939
|
+
* @param readableMap The readable map retrieved from React native
|
|
940
|
+
* @param promise The promise to handle the obtained value. Promises are necessary in Native Modules
|
|
941
|
+
* Native Modules to pass values back to the JavaScript.
|
|
942
|
+
*/
|
|
943
|
+
@ReactMethod
|
|
944
|
+
public void createViewEventAsync(@Nonnull String interactionId, ReadableMap readableMap, @Nonnull final Promise promise) {
|
|
945
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
946
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
947
|
+
|
|
948
|
+
if (blueConicClient != null) {
|
|
949
|
+
Activity activity = getCurrentActivity();
|
|
950
|
+
if (activity == null) {
|
|
951
|
+
activity = new Activity();
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
blueConicClient.createViewEvent(interactionId, properties, activity, new com.blueconic.Callback() {
|
|
955
|
+
@Override
|
|
956
|
+
public void onSuccess() {
|
|
957
|
+
promise.resolve(getWritableArray());
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
@Override
|
|
961
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
962
|
+
promise.resolve(getWritableArray());
|
|
963
|
+
}
|
|
964
|
+
});
|
|
965
|
+
} else {
|
|
966
|
+
promise.resolve(getWritableArray());
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
/**
|
|
971
|
+
* Create View Event.
|
|
972
|
+
*
|
|
973
|
+
* @param interactionId The type of event
|
|
974
|
+
* @param readableMap The readable map retrieved from React native
|
|
975
|
+
* @param callback The Callback function to handle the obtained values. Callbacks are necessary in Native Modules
|
|
976
|
+
* to pass values back to the JavaScript.
|
|
977
|
+
*/
|
|
978
|
+
@ReactMethod
|
|
979
|
+
public void createViewEventWithCallback(@Nonnull String interactionId, ReadableMap readableMap, @Nonnull final Callback callback) {
|
|
980
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
981
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
982
|
+
|
|
983
|
+
if (blueConicClient != null) {
|
|
984
|
+
Activity activity = getCurrentActivity();
|
|
985
|
+
if (activity == null) {
|
|
986
|
+
activity = new Activity();
|
|
987
|
+
}
|
|
988
|
+
blueConicClient.createViewEvent(interactionId, properties, activity, new com.blueconic.Callback() {
|
|
989
|
+
@Override
|
|
990
|
+
public void onSuccess() {
|
|
991
|
+
callback.invoke(true, null);
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
@Override
|
|
995
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
996
|
+
callback.invoke(false, error.toString());
|
|
997
|
+
}
|
|
998
|
+
});
|
|
999
|
+
} else {
|
|
1000
|
+
callback.invoke(false, "InternalError");
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Create Conversion Event.
|
|
1006
|
+
*
|
|
1007
|
+
* @param interactionId The type of event
|
|
1008
|
+
* @param readableMap The readable map retrieved from React native
|
|
1009
|
+
*/
|
|
1010
|
+
@ReactMethod
|
|
1011
|
+
public void createConversionEvent(@Nonnull String interactionId, ReadableMap readableMap) {
|
|
1012
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1013
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
1014
|
+
|
|
1015
|
+
if (blueConicClient != null) {
|
|
1016
|
+
Activity activity = getCurrentActivity();
|
|
1017
|
+
if (activity == null) {
|
|
1018
|
+
activity = new Activity();
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
blueConicClient.createConversionEvent(interactionId, properties, activity,null);
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
/**
|
|
1026
|
+
* Create Conversion Event.
|
|
1027
|
+
*
|
|
1028
|
+
* @param interactionId The interaction id of the event
|
|
1029
|
+
* @param readableMap The readable map retrieved from React native
|
|
1030
|
+
* @param promise The promise to handle the obtained value. Promises are necessary in Native Modules
|
|
1031
|
+
* Native Modules to pass values back to the JavaScript.
|
|
1032
|
+
*/
|
|
1033
|
+
@ReactMethod
|
|
1034
|
+
public void createConversionEventAsync(@Nonnull String interactionId, ReadableMap readableMap, @Nonnull final Promise promise) {
|
|
1035
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1036
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
1037
|
+
|
|
1038
|
+
if (blueConicClient != null) {
|
|
1039
|
+
Activity activity = getCurrentActivity();
|
|
1040
|
+
if (activity == null) {
|
|
1041
|
+
activity = new Activity();
|
|
1042
|
+
}
|
|
1043
|
+
blueConicClient.createConversionEvent(interactionId, properties, activity, new com.blueconic.Callback() {
|
|
1044
|
+
@Override
|
|
1045
|
+
public void onSuccess() {
|
|
1046
|
+
promise.resolve(getWritableArray());
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
@Override
|
|
1050
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
1051
|
+
promise.resolve(getWritableArray());
|
|
1052
|
+
}
|
|
1053
|
+
});
|
|
1054
|
+
} else {
|
|
1055
|
+
promise.resolve(getWritableArray());
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
/**
|
|
1060
|
+
* Create Conversion Event.
|
|
1061
|
+
*
|
|
1062
|
+
* @param interactionId The type of event
|
|
1063
|
+
* @param readableMap The readable map retrieved from React native
|
|
1064
|
+
* @param callback The Callback function to handle the obtained values. Callbacks are necessary in Native Modules
|
|
1065
|
+
* to pass values back to the JavaScript.
|
|
1066
|
+
*/
|
|
1067
|
+
@ReactMethod
|
|
1068
|
+
public void createConversionEventWithCallback(@Nonnull String interactionId, ReadableMap readableMap, @Nonnull final Callback callback) {
|
|
1069
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1070
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
1071
|
+
|
|
1072
|
+
if (blueConicClient != null) {
|
|
1073
|
+
Activity activity = getCurrentActivity();
|
|
1074
|
+
if (activity == null) {
|
|
1075
|
+
activity = new Activity();
|
|
1076
|
+
}
|
|
1077
|
+
blueConicClient.createConversionEvent(interactionId, properties, activity, new com.blueconic.Callback() {
|
|
1078
|
+
@Override
|
|
1079
|
+
public void onSuccess() {
|
|
1080
|
+
callback.invoke(true, null);
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
@Override
|
|
1084
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
1085
|
+
callback.invoke(false, error.toString());
|
|
1086
|
+
}
|
|
1087
|
+
});
|
|
1088
|
+
} else {
|
|
1089
|
+
callback.invoke(false, "InternalError");
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* Create Click Event.
|
|
1095
|
+
*
|
|
1096
|
+
* @param interactionId The type of event
|
|
1097
|
+
* @param readableMap The readable map retrieved from React native
|
|
1098
|
+
*/
|
|
1099
|
+
@ReactMethod
|
|
1100
|
+
public void createClickEvent(@Nonnull String interactionId, ReadableMap readableMap) {
|
|
1101
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1102
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
1103
|
+
|
|
1104
|
+
if (blueConicClient != null) {
|
|
1105
|
+
Activity activity = getCurrentActivity();
|
|
1106
|
+
if (activity == null) {
|
|
1107
|
+
activity = new Activity();
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
blueConicClient.createClickEvent(interactionId, properties, activity,null);
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* Create Click Event.
|
|
1116
|
+
*
|
|
1117
|
+
* @param interactionId The interaction id of the event
|
|
1118
|
+
* @param readableMap The readable map retrieved from React native
|
|
1119
|
+
* @param promise The promise to handle the obtained value. Promises are necessary in Native Modules
|
|
1120
|
+
* Native Modules to pass values back to the JavaScript.
|
|
1121
|
+
*/
|
|
1122
|
+
@ReactMethod
|
|
1123
|
+
public void createClickEventAsync(@Nonnull String interactionId, ReadableMap readableMap, @Nonnull final Promise promise) {
|
|
1124
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1125
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
1126
|
+
|
|
1127
|
+
if (blueConicClient != null) {
|
|
1128
|
+
Activity activity = getCurrentActivity();
|
|
1129
|
+
if (activity == null) {
|
|
1130
|
+
activity = new Activity();
|
|
1131
|
+
}
|
|
1132
|
+
blueConicClient.createClickEvent(interactionId, properties, activity, new com.blueconic.Callback() {
|
|
1133
|
+
@Override
|
|
1134
|
+
public void onSuccess() {
|
|
1135
|
+
promise.resolve(getWritableArray());
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
@Override
|
|
1139
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
1140
|
+
promise.resolve(getWritableArray());
|
|
1141
|
+
}
|
|
1142
|
+
});
|
|
1143
|
+
} else {
|
|
1144
|
+
promise.resolve(getWritableArray());
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* Create Click Event.
|
|
1150
|
+
*
|
|
1151
|
+
* @param interactionId The type of event
|
|
1152
|
+
* @param readableMap The readable map retrieved from React native
|
|
1153
|
+
* @param callback The Callback function to handle the obtained values. Callbacks are necessary in Native Modules
|
|
1154
|
+
* to pass values back to the JavaScript.
|
|
1155
|
+
*/
|
|
1156
|
+
@ReactMethod
|
|
1157
|
+
public void createClickEventWithCallback(@Nonnull String interactionId, ReadableMap readableMap, @Nonnull final Callback callback) {
|
|
1158
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1159
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
1160
|
+
|
|
1161
|
+
if (blueConicClient != null) {
|
|
1162
|
+
Activity activity = getCurrentActivity();
|
|
1163
|
+
if (activity == null) {
|
|
1164
|
+
activity = new Activity();
|
|
1165
|
+
}
|
|
1166
|
+
blueConicClient.createClickEvent(interactionId, properties, activity, new com.blueconic.Callback() {
|
|
1167
|
+
@Override
|
|
1168
|
+
public void onSuccess() {
|
|
1169
|
+
callback.invoke(true, null);
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
@Override
|
|
1173
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
1174
|
+
callback.invoke(false, error.toString());
|
|
1175
|
+
}
|
|
1176
|
+
});
|
|
1177
|
+
} else {
|
|
1178
|
+
callback.invoke(false, "InternalError");
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* Create Timeline Event.
|
|
1184
|
+
*
|
|
1185
|
+
* @param eventType The type of event
|
|
1186
|
+
* @param eventDate The date of the event
|
|
1187
|
+
* @param readableMap The readable map retrieved from React native
|
|
1188
|
+
*/
|
|
1189
|
+
@ReactMethod
|
|
1190
|
+
public void createTimelineEvent(@Nonnull String eventType, double eventDate, ReadableMap readableMap) {
|
|
1191
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1192
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
1193
|
+
|
|
1194
|
+
if (blueConicClient != null) {
|
|
1195
|
+
blueConicClient.createTimelineEvent(eventType, new Date((long) eventDate), properties, null);
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* Create Timeline Event.
|
|
1201
|
+
*
|
|
1202
|
+
* @param eventType The type of event
|
|
1203
|
+
* @param eventDate The date of the event
|
|
1204
|
+
* @param readableMap The readable map retrieved from React native
|
|
1205
|
+
* @param promise The promise to handle the obtained value. Promises are necessary in Native Modules
|
|
1206
|
+
* Native Modules to pass values back to the JavaScript.
|
|
1207
|
+
*/
|
|
1208
|
+
@ReactMethod
|
|
1209
|
+
public void createTimelineEventAsync(@Nonnull String eventType, double eventDate, ReadableMap readableMap, @Nonnull final Promise promise) {
|
|
1210
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1211
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
1212
|
+
|
|
1213
|
+
if (blueConicClient != null) {
|
|
1214
|
+
blueConicClient.createTimelineEvent(eventType, new Date((long) eventDate), properties, new com.blueconic.Callback() {
|
|
1215
|
+
@Override
|
|
1216
|
+
public void onSuccess() {
|
|
1217
|
+
promise.resolve(getWritableArray());
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
@Override
|
|
1221
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
1222
|
+
promise.resolve(getWritableArray());
|
|
1223
|
+
}
|
|
1224
|
+
});
|
|
1225
|
+
} else {
|
|
1226
|
+
promise.resolve(getWritableArray());
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* Create Timeline Event.
|
|
1232
|
+
*
|
|
1233
|
+
* @param eventType The type of event
|
|
1234
|
+
* @param eventDate The date of the event
|
|
1235
|
+
* @param readableMap The readable map retrieved from React native
|
|
1236
|
+
* @param callback The Callback function to handle the obtained values. Callbacks are necessary in Native Modules
|
|
1237
|
+
* to pass values back to the JavaScript.
|
|
1238
|
+
*/
|
|
1239
|
+
@ReactMethod
|
|
1240
|
+
public void createTimelineEventWithCallback(@Nonnull String eventType, double eventDate, ReadableMap readableMap, @Nonnull final Callback callback) {
|
|
1241
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1242
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
1243
|
+
|
|
1244
|
+
if (blueConicClient != null) {
|
|
1245
|
+
blueConicClient.createTimelineEvent(eventType, new Date((long) eventDate), properties, new com.blueconic.Callback() {
|
|
1246
|
+
@Override
|
|
1247
|
+
public void onSuccess() {
|
|
1248
|
+
callback.invoke(true, null);
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
@Override
|
|
1252
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
1253
|
+
callback.invoke(false, error.toString());
|
|
1254
|
+
}
|
|
1255
|
+
});
|
|
1256
|
+
} else {
|
|
1257
|
+
callback.invoke(false, "InternalError");
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Create Timeline Event.
|
|
1263
|
+
*
|
|
1264
|
+
* @param eventType The type of event
|
|
1265
|
+
* @param eventDate The date of the event
|
|
1266
|
+
* @param readableMap The readable map retrieved from React native
|
|
1267
|
+
*/
|
|
1268
|
+
@ReactMethod
|
|
1269
|
+
public void createTimelineEventById(@Nonnull String eventId, @Nonnull String eventType, double eventDate, ReadableMap readableMap) {
|
|
1270
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1271
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
1272
|
+
|
|
1273
|
+
if (blueConicClient != null) {
|
|
1274
|
+
blueConicClient.createTimelineEventById(eventId, eventType, new Date((long) eventDate), properties, null);
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
/**
|
|
1279
|
+
* Create Timeline Event.
|
|
1280
|
+
*
|
|
1281
|
+
* @param eventType The type of event
|
|
1282
|
+
* @param eventDate The date of the event
|
|
1283
|
+
* @param readableMap The readable map retrieved from React native
|
|
1284
|
+
* @param promise The promise to handle the obtained value. Promises are necessary in Native Modules
|
|
1285
|
+
* Native Modules to pass values back to the JavaScript.
|
|
1286
|
+
*/
|
|
1287
|
+
@ReactMethod
|
|
1288
|
+
public void createTimelineEventByIdAsync(@Nonnull String eventId, @Nonnull String eventType, double eventDate, ReadableMap readableMap, @Nonnull final Promise promise) {
|
|
1289
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1290
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
1291
|
+
|
|
1292
|
+
if (blueConicClient != null) {
|
|
1293
|
+
blueConicClient.createTimelineEventById(eventId, eventType, new Date((long) eventDate), properties, new com.blueconic.Callback() {
|
|
1294
|
+
@Override
|
|
1295
|
+
public void onSuccess() {
|
|
1296
|
+
promise.resolve(getWritableArray());
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
@Override
|
|
1300
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
1301
|
+
promise.resolve(getWritableArray());
|
|
1302
|
+
}
|
|
1303
|
+
});
|
|
1304
|
+
} else {
|
|
1305
|
+
promise.resolve(getWritableArray());
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* Create Timeline Event.
|
|
1311
|
+
*
|
|
1312
|
+
* @param eventType The type of event
|
|
1313
|
+
* @param eventDate The date of the event
|
|
1314
|
+
* @param readableMap The readable map retrieved from React native
|
|
1315
|
+
* @param callback The Callback function to handle the obtained values. Callbacks are necessary in Native Modules
|
|
1316
|
+
* to pass values back to the JavaScript.
|
|
1317
|
+
*/
|
|
1318
|
+
@ReactMethod
|
|
1319
|
+
public void createTimelineEventByIdWithCallback(@Nonnull String eventId, @Nonnull String eventType, double eventDate, ReadableMap readableMap, @Nonnull final Callback callback) {
|
|
1320
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1321
|
+
final Map<String, Object> properties = readableMap.toHashMap();
|
|
1322
|
+
|
|
1323
|
+
if (blueConicClient != null) {
|
|
1324
|
+
blueConicClient.createTimelineEventById(eventId, eventType, new Date((long) eventDate), properties, new com.blueconic.Callback() {
|
|
1325
|
+
@Override
|
|
1326
|
+
public void onSuccess() {
|
|
1327
|
+
callback.invoke(true, null);
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
@Override
|
|
1331
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
1332
|
+
callback.invoke(false, error.toString());
|
|
1333
|
+
}
|
|
1334
|
+
});
|
|
1335
|
+
} else {
|
|
1336
|
+
callback.invoke(false, "InternalError");
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
@ReactMethod
|
|
1341
|
+
public void subscribe(@Nonnull String eventName, boolean onlyOnce, @Nonnull String identifier) {
|
|
1342
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1343
|
+
|
|
1344
|
+
EventHandler eventHandler = switch (eventName) {
|
|
1345
|
+
case "propertiesDialogueEvent" -> new PropertiesDialogueHandler(eventName);
|
|
1346
|
+
default -> event -> {};
|
|
1347
|
+
};
|
|
1348
|
+
|
|
1349
|
+
blueConicClient.getEventManager().subscribe(eventName, eventHandler, onlyOnce, identifier);
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
@ReactMethod
|
|
1353
|
+
public void unsubscribe(@Nonnull String identifier) {
|
|
1354
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1355
|
+
blueConicClient.getEventManager().unsubscribe(identifier);
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* Creates a ClickEvent for the given selector and publishes the event to BlueConic using the EventManager.
|
|
1360
|
+
*
|
|
1361
|
+
* @param selector The selector to identify the clicked component.
|
|
1362
|
+
*/
|
|
1363
|
+
@ReactMethod
|
|
1364
|
+
public void publishClickEvent(@Nonnull String selector, ReadableArray values) {
|
|
1365
|
+
List<String> contextValues;
|
|
1366
|
+
if (values == null) {
|
|
1367
|
+
contextValues = emptyList();
|
|
1368
|
+
} else {
|
|
1369
|
+
contextValues = toList(values);
|
|
1370
|
+
}
|
|
1371
|
+
getBlueConicClientInstance().getEventManager().publishClickEvent(selector, contextValues, null);
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
/**
|
|
1375
|
+
* Creates a ClickEvent for the given selector and publishes the event to BlueConic using the EventManager.
|
|
1376
|
+
*
|
|
1377
|
+
* @param selector The selector to identify the clicked component.
|
|
1378
|
+
*/
|
|
1379
|
+
@ReactMethod
|
|
1380
|
+
public void publishClickEventWithCallback(@Nonnull String selector, ReadableArray values, @Nonnull final Callback callback) {
|
|
1381
|
+
List<String> contextValues;
|
|
1382
|
+
if (values == null) {
|
|
1383
|
+
contextValues = emptyList();
|
|
1384
|
+
} else {
|
|
1385
|
+
contextValues = toList(values);
|
|
1386
|
+
}
|
|
1387
|
+
getBlueConicClientInstance().getEventManager().publishClickEvent(selector, contextValues, new com.blueconic.Callback() {
|
|
1388
|
+
@Override
|
|
1389
|
+
public void onSuccess() {
|
|
1390
|
+
callback.invoke(true, null);
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
@Override
|
|
1394
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
1395
|
+
callback.invoke(false, error.toString());
|
|
1396
|
+
}
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
/**
|
|
1401
|
+
* Creates a ClickEvent for the given selector and publishes the event to BlueConic using the EventManager.
|
|
1402
|
+
*
|
|
1403
|
+
* @param selector The selector to identify the clicked component.
|
|
1404
|
+
*/
|
|
1405
|
+
@ReactMethod
|
|
1406
|
+
public void publishFormSubmitEvent(@Nonnull String selector, ReadableArray values) {
|
|
1407
|
+
List<String> contextValues;
|
|
1408
|
+
if (values == null) {
|
|
1409
|
+
contextValues = emptyList();
|
|
1410
|
+
} else {
|
|
1411
|
+
contextValues = toList(values);
|
|
1412
|
+
}
|
|
1413
|
+
getBlueConicClientInstance().getEventManager().publishFormSubmitEvent(selector, contextValues, null);
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
/**
|
|
1417
|
+
* Creates a ClickEvent for the given selector and publishes the event to BlueConic using the EventManager.
|
|
1418
|
+
*
|
|
1419
|
+
* @param selector The selector to identify the clicked component.
|
|
1420
|
+
*/
|
|
1421
|
+
@ReactMethod
|
|
1422
|
+
public void publishFormSubmitEventWithCallback(@Nonnull String selector, ReadableArray values, @Nonnull final Callback callback) {
|
|
1423
|
+
List<String> contextValues;
|
|
1424
|
+
if (values == null) {
|
|
1425
|
+
contextValues = emptyList();
|
|
1426
|
+
} else {
|
|
1427
|
+
contextValues = toList(values);
|
|
1428
|
+
}
|
|
1429
|
+
getBlueConicClientInstance().getEventManager().publishFormSubmitEvent(selector, contextValues, new com.blueconic.Callback() {
|
|
1430
|
+
@Override
|
|
1431
|
+
public void onSuccess() {
|
|
1432
|
+
callback.invoke(true, null);
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
@Override
|
|
1436
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
1437
|
+
callback.invoke(false, error.toString());
|
|
1438
|
+
}
|
|
1439
|
+
});
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* Creates an UpdateContentEvent for the given selector and value, and publishes the event using the EventManager.
|
|
1444
|
+
*
|
|
1445
|
+
* @param selector The selector to identify the component with updated values.
|
|
1446
|
+
* @param value The value to be passed on to BlueConic.
|
|
1447
|
+
*/
|
|
1448
|
+
@ReactMethod
|
|
1449
|
+
public void publishUpdateContentEvent(@Nonnull String selector, @Nonnull String value) {
|
|
1450
|
+
getBlueConicClientInstance().getEventManager().publishUpdateContentEvent(selector, value, null);
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
* Creates an UpdateContentEvent for the given selector and value, and publishes the event using the EventManager.
|
|
1455
|
+
*
|
|
1456
|
+
* @param selector The selector to identify the component with updated values.
|
|
1457
|
+
* @param value The value to be passed on to BlueConic.
|
|
1458
|
+
*/
|
|
1459
|
+
@ReactMethod
|
|
1460
|
+
public void publishUpdateContentEventWithCallback(@Nonnull String selector, @Nonnull String value, @Nonnull final Callback callback) {
|
|
1461
|
+
getBlueConicClientInstance().getEventManager().publishUpdateContentEvent(selector, value, new com.blueconic.Callback() {
|
|
1462
|
+
@Override
|
|
1463
|
+
public void onSuccess() {
|
|
1464
|
+
callback.invoke(true, null);
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
@Override
|
|
1468
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
1469
|
+
callback.invoke(false, error.toString());
|
|
1470
|
+
}
|
|
1471
|
+
});
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
/**
|
|
1475
|
+
* Creates an UpdateValuesEvent for the given selector and value, and publishes the event using the EventManager.
|
|
1476
|
+
*
|
|
1477
|
+
* @param selector The selector to identify the component with updated values.
|
|
1478
|
+
* @param value The value to be passed on to BlueConic.
|
|
1479
|
+
*/
|
|
1480
|
+
@ReactMethod
|
|
1481
|
+
public void publishUpdateValuesEvent(@Nonnull String selector, @Nonnull String value) {
|
|
1482
|
+
getBlueConicClientInstance().getEventManager().publishUpdateValuesEvent(selector, Collections.singletonList(value), null);
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
/**
|
|
1486
|
+
* Creates an UpdateValuesEvent for the given selector and value, and publishes the event using the EventManager.
|
|
1487
|
+
*
|
|
1488
|
+
* @param selector The selector to identify the component with updated values.
|
|
1489
|
+
* @param value The value to be passed on to BlueConic.
|
|
1490
|
+
*/
|
|
1491
|
+
@ReactMethod
|
|
1492
|
+
public void publishUpdateValuesEventWithCallback(@Nonnull String selector, @Nonnull String value, @Nonnull final Callback callback) {
|
|
1493
|
+
getBlueConicClientInstance().getEventManager().publishUpdateValuesEvent(selector, Collections.singletonList(value), new com.blueconic.Callback() {
|
|
1494
|
+
@Override
|
|
1495
|
+
public void onSuccess() {
|
|
1496
|
+
callback.invoke(true, null);
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
@Override
|
|
1500
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
1501
|
+
callback.invoke(false, error.toString());
|
|
1502
|
+
}
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
/**
|
|
1507
|
+
* Creates an AdvancedEvent with the given name and values, and publishes the event using the EventManager.
|
|
1508
|
+
*
|
|
1509
|
+
* @param name The name to identify the event.
|
|
1510
|
+
* @param values The values to pass to BlueConic as context of the event.
|
|
1511
|
+
*/
|
|
1512
|
+
@ReactMethod
|
|
1513
|
+
public void publishAdvancedEvent(@Nonnull String name, @Nonnull ReadableArray values) {
|
|
1514
|
+
getBlueConicClientInstance().getEventManager().publishAdvancedEvent(name, toList(values), null);
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
/**
|
|
1518
|
+
* Creates an AdvancedEvent with the given name and values, and publishes the event using the EventManager.
|
|
1519
|
+
*
|
|
1520
|
+
* @param name The name to identify the event.
|
|
1521
|
+
* @param values The values to pass to BlueConic as context of the event.
|
|
1522
|
+
*/
|
|
1523
|
+
@ReactMethod
|
|
1524
|
+
public void publishAdvancedEventWithCallback(@Nonnull String name, @Nonnull ReadableArray values, @Nonnull final Callback callback) {
|
|
1525
|
+
getBlueConicClientInstance().getEventManager().publishAdvancedEvent(name, toList(values), new com.blueconic.Callback() {
|
|
1526
|
+
@Override
|
|
1527
|
+
public void onSuccess() {
|
|
1528
|
+
callback.invoke(true, null);
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
@Override
|
|
1532
|
+
public void onError(@NotNull com.blueconic.Error error) {
|
|
1533
|
+
callback.invoke(false, error.toString());
|
|
1534
|
+
}
|
|
1535
|
+
});
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
/**
|
|
1539
|
+
* Destroys all active BlueConic plugins (i.e. instances of listeners and dialogues). This method must be called
|
|
1540
|
+
* in the onPause of an activity if the app targets Android API versions before API 14. It should also be called if
|
|
1541
|
+
* one switches screens in the app without calling the onPause of the previous Activity.
|
|
1542
|
+
*/
|
|
1543
|
+
@ReactMethod
|
|
1544
|
+
public void destroyPlugins() {
|
|
1545
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1546
|
+
if (blueConicClient != null) {
|
|
1547
|
+
blueConicClient.destroyPlugins();
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
@ReactMethod
|
|
1552
|
+
public void addListener(String eventName) {
|
|
1553
|
+
// Keep: Required for RN built in Event Emitter Calls.
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
@ReactMethod
|
|
1557
|
+
public void removeListeners(Integer count) {
|
|
1558
|
+
// Keep: Required for RN built in Event Emitter Calls.
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
/**
|
|
1562
|
+
* Returns an instance of the BlueConicClient
|
|
1563
|
+
*
|
|
1564
|
+
* @return BlueConicClient
|
|
1565
|
+
*/
|
|
1566
|
+
protected BlueConicClient getBlueConicClientInstance() {
|
|
1567
|
+
BlueConicClient instance = BlueConicClient.Companion.getInstance();
|
|
1568
|
+
//Set platform information
|
|
1569
|
+
BlueConicClientImpl implInstance = (BlueConicClientImpl) instance;
|
|
1570
|
+
implInstance.setPlatformInformation(BuildConfig.PLATFORM_NAME, BuildConfig.PLATFORM_VERSION);
|
|
1571
|
+
|
|
1572
|
+
return instance;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
private WritableArray getFormattedSegments() {
|
|
1576
|
+
final BlueConicClient blueConicClient = getBlueConicClientInstance();
|
|
1577
|
+
final WritableArray result = getWritableArray();
|
|
1578
|
+
|
|
1579
|
+
if (blueConicClient == null) {
|
|
1580
|
+
return result;
|
|
1581
|
+
}
|
|
1582
|
+
final Collection<Segment> segments = blueConicClient.getSegments();
|
|
1583
|
+
|
|
1584
|
+
for (Segment segment : segments) {
|
|
1585
|
+
final WritableMap item = getWritableMap();
|
|
1586
|
+
item.putString("id", segment.getId());
|
|
1587
|
+
item.putString("name", segment.getName());
|
|
1588
|
+
result.pushMap(item);
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
return result;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
/**
|
|
1595
|
+
* Static method that is called by the BlueConicInteraction when it receives the parameters of the dialogue,
|
|
1596
|
+
* and when the dialogue is destroyed by the BlueConic SDK. An event is published to which the JavaScript of the
|
|
1597
|
+
* app should subscribe.
|
|
1598
|
+
*
|
|
1599
|
+
* @param properties The properties of the dialogues as received from BlueConic.
|
|
1600
|
+
* @param eventName The name of the event to be published.
|
|
1601
|
+
*/
|
|
1602
|
+
static void publishDialogueEvent(@Nonnull Map<String, Object> properties, String eventName) {
|
|
1603
|
+
WritableMap map = Arguments.makeNativeMap(properties);
|
|
1604
|
+
|
|
1605
|
+
if (helper != null) {
|
|
1606
|
+
helper.getReactContext().getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(eventName, map);
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
protected WritableArray getWritableArray() {
|
|
1611
|
+
return new WritableNativeArray();
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
protected WritableMap getWritableMap() {
|
|
1615
|
+
return new WritableNativeMap();
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
protected Handler getHandler() {
|
|
1619
|
+
return new Handler(Looper.getMainLooper());
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
/**
|
|
1623
|
+
* Imported method from React Native.
|
|
1624
|
+
* Reason for copying the method is to allow unit tests to provide the WritableArray implementation.
|
|
1625
|
+
* Should be kept as is without any changes.
|
|
1626
|
+
*
|
|
1627
|
+
* @param list
|
|
1628
|
+
* @return
|
|
1629
|
+
*/
|
|
1630
|
+
protected WritableArray fromList(List list) {
|
|
1631
|
+
WritableArray catalystArray = getWritableArray();
|
|
1632
|
+
|
|
1633
|
+
for (Object obj : list) {
|
|
1634
|
+
if (obj == null) {
|
|
1635
|
+
catalystArray.pushNull();
|
|
1636
|
+
} else if (obj.getClass().isArray()) {
|
|
1637
|
+
catalystArray.pushArray(fromArray(obj));
|
|
1638
|
+
} else if (obj instanceof Bundle) {
|
|
1639
|
+
catalystArray.pushMap(fromBundle((Bundle) obj));
|
|
1640
|
+
} else if (obj instanceof List) {
|
|
1641
|
+
catalystArray.pushArray(fromList((List) obj));
|
|
1642
|
+
} else if (obj instanceof String) {
|
|
1643
|
+
catalystArray.pushString((String) obj);
|
|
1644
|
+
} else if (obj instanceof Integer) {
|
|
1645
|
+
catalystArray.pushInt((Integer) obj);
|
|
1646
|
+
} else if (obj instanceof Number) {
|
|
1647
|
+
catalystArray.pushDouble(((Number) obj).doubleValue());
|
|
1648
|
+
} else {
|
|
1649
|
+
if (!(obj instanceof Boolean)) {
|
|
1650
|
+
throw new IllegalArgumentException("Unknown value type " + obj.getClass());
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
catalystArray.pushBoolean((Boolean) obj);
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
return catalystArray;
|
|
1658
|
+
}
|
|
1659
|
+
|
|
1660
|
+
/**
|
|
1661
|
+
* Imported method from React Native.
|
|
1662
|
+
* Reason for copying the method is to allow unit tests to provide the WritableArray implementation.
|
|
1663
|
+
* Should be kept as is without any changes.
|
|
1664
|
+
*
|
|
1665
|
+
* @param array
|
|
1666
|
+
* @return
|
|
1667
|
+
*/
|
|
1668
|
+
protected WritableArray fromArray(Object array) {
|
|
1669
|
+
WritableArray catalystArray = getWritableArray();
|
|
1670
|
+
int var3;
|
|
1671
|
+
int var4;
|
|
1672
|
+
if (array instanceof String[] var2) {
|
|
1673
|
+
var3 = var2.length;
|
|
1674
|
+
|
|
1675
|
+
for (var4 = 0; var4 < var3; ++var4) {
|
|
1676
|
+
String v = var2[var4];
|
|
1677
|
+
catalystArray.pushString(v);
|
|
1678
|
+
}
|
|
1679
|
+
} else if (array instanceof Bundle[] var7) {
|
|
1680
|
+
var3 = var7.length;
|
|
1681
|
+
|
|
1682
|
+
for (var4 = 0; var4 < var3; ++var4) {
|
|
1683
|
+
Bundle v = var7[var4];
|
|
1684
|
+
catalystArray.pushMap(fromBundle(v));
|
|
1685
|
+
}
|
|
1686
|
+
} else if (array instanceof int[] var8) {
|
|
1687
|
+
var3 = var8.length;
|
|
1688
|
+
|
|
1689
|
+
for (var4 = 0; var4 < var3; ++var4) {
|
|
1690
|
+
int v = var8[var4];
|
|
1691
|
+
catalystArray.pushInt(v);
|
|
1692
|
+
}
|
|
1693
|
+
} else if (array instanceof float[] var9) {
|
|
1694
|
+
var3 = var9.length;
|
|
1695
|
+
|
|
1696
|
+
for (var4 = 0; var4 < var3; ++var4) {
|
|
1697
|
+
float v = var9[var4];
|
|
1698
|
+
catalystArray.pushDouble(v);
|
|
1699
|
+
}
|
|
1700
|
+
} else if (array instanceof double[] var10) {
|
|
1701
|
+
var3 = var10.length;
|
|
1702
|
+
|
|
1703
|
+
for (var4 = 0; var4 < var3; ++var4) {
|
|
1704
|
+
double v = var10[var4];
|
|
1705
|
+
catalystArray.pushDouble(v);
|
|
1706
|
+
}
|
|
1707
|
+
} else if (array instanceof boolean[] var11) {
|
|
1708
|
+
var3 = var11.length;
|
|
1709
|
+
|
|
1710
|
+
for (var4 = 0; var4 < var3; ++var4) {
|
|
1711
|
+
boolean v = var11[var4];
|
|
1712
|
+
catalystArray.pushBoolean(v);
|
|
1713
|
+
}
|
|
1714
|
+
} else {
|
|
1715
|
+
if (!(array instanceof Parcelable[] var12)) {
|
|
1716
|
+
throw new IllegalArgumentException("Unknown array type " + array.getClass());
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
var3 = var12.length;
|
|
1720
|
+
|
|
1721
|
+
for (var4 = 0; var4 < var3; ++var4) {
|
|
1722
|
+
Parcelable v = var12[var4];
|
|
1723
|
+
if (!(v instanceof Bundle)) {
|
|
1724
|
+
throw new IllegalArgumentException("Unexpected array member type " + v.getClass());
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
catalystArray.pushMap(fromBundle((Bundle) v));
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
return catalystArray;
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
class PropertiesDialogueHandler implements EventHandler {
|
|
1736
|
+
private final String eventName;
|
|
1737
|
+
|
|
1738
|
+
PropertiesDialogueHandler(String eventName) {
|
|
1739
|
+
this.eventName = eventName;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
@Override
|
|
1743
|
+
public void handleEvent(@NotNull Event event) {
|
|
1744
|
+
PropertiesDialogueEvent propertiesDialogueEvent = (PropertiesDialogueEvent) event;
|
|
1745
|
+
Map<String, Object> values = new HashMap<>();
|
|
1746
|
+
values.put("variantId", propertiesDialogueEvent.getVariantId());
|
|
1747
|
+
values.put("position", propertiesDialogueEvent.getPosition());
|
|
1748
|
+
values.put("data", propertiesDialogueEvent.getData());
|
|
1749
|
+
BlueConicClientModule.publishDialogueEvent(values, eventName);
|
|
1750
|
+
}
|
|
1049
1751
|
}
|