uqudosdk-cordova 3.7.0 → 3.8.0-patch.1

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 CHANGED
@@ -1,3 +1,19 @@
1
+ ## 3.8.0
2
+
3
+ * New Document Support:
4
+ - Added support for Jordanian, Syrian, and Yemeni national IDs
5
+ * Android: Upgraded CameraX library to version 1.5.3. If your application also uses CameraX, you must upgrade to the same version. Please note that this version requires a minimum SDK level of 23, so starting from this release your application must set `minSdkVersion` to 23 in order to build successfully
6
+ * NFC: Added support for eID cards (ID-1 format) issued by countries that include a Machine Readable Zone (MRZ) on the back, comply with ICAO Doc 9303, and contain a contactless chip (ISO/IEC 14443 / NFC). This feature is available in the "Enrollment Flow" and "NFC / Reading Flow" using the document type GENERIC_ID or MRZ (when scanning only the back side). If a country is not supported, the NFC reading step is skipped according to the SDK’s default configuration
7
+ * Tampering Detection: The ID photo tampering detection model has been removed from the SDK, and disableTamperingRejection() is now a no-op
8
+ - What does this mean? From a tampering detection perspective, nothing changes, as all SDK checks continue to be performed on the server along with additional validations
9
+ - How am I impacted? There should be no impact if you follow best practices, specifically, validating SDK results on your side, including reviewing tampering detection scores
10
+ - For more information about this change, please contact support
11
+ * Miscellaneous: Minor bug fixes and improvements
12
+
13
+ ## 3.7.0-patch.1
14
+
15
+ * Resolved possible race condition that triggers a CalledFromWrongThreadException on UI and theme updates
16
+
1
17
  ## 3.7.0
2
18
 
3
19
  * Introduced a new SDK feature that performs device attestation and returns the result within the SDK result object. The Device Attestation output must be actively parsed and evaluated in your backend as part of your core business logic. Each flag should be assessed based on your specific risk model and use case. While some attributes may require contextual evaluation depending on your fraud strategy and internal policies, others should be treated as immediate high-risk indicators. Please see "Device Attestation" for more details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uqudosdk-cordova",
3
- "version": "3.7.0",
3
+ "version": "3.8.0-patch.1",
4
4
  "description": "Plugin to link native Android and iOS SDK with the ionic application. Using this plugin, ionic apps can now use the Uqudo SDK for enrollment, account recovery and face recognition",
5
5
  "cordova": {
6
6
  "id": "uqudosdk-cordova",
package/plugin.xml CHANGED
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="uqudosdk-cordova" version="3.7.0">
2
+ <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="uqudosdk-cordova" version="3.8.0-patch.1">
3
3
  <name>UqudoIdPlugin</name>
4
4
  <js-module name="UqudoIdPlugin" src="www/UqudoIdPlugin.js">
5
5
  <clobbers target="cordova.plugins.UqudoIdPlugin" />
@@ -25,7 +25,7 @@
25
25
  <podspec>
26
26
  <config/>
27
27
  <pods use-frameworks="true">
28
- <pod name="UqudoSDK" spec="3.7.0" />
28
+ <pod name="UqudoSDK" spec="3.8.0" />
29
29
  </pods>
30
30
  </podspec>
31
31
  <podspec>
@@ -64,6 +64,7 @@ public class UqudoIdPlugin extends CordovaPlugin {
64
64
  return true;
65
65
  case "setLocale":
66
66
  setLocale(args.getString(0), context);
67
+ return true;
67
68
  case "enroll": {
68
69
  callback = callbackContext;
69
70
  String message = args.getString(0);
@@ -159,18 +160,7 @@ public class UqudoIdPlugin extends CordovaPlugin {
159
160
  }
160
161
 
161
162
  private void setLocale(String locale, Context context) {
162
- System.out.println("----locale" + locale);
163
- try {
164
- if (locale != null) {
165
- Locale myLocale = new Locale(locale);
166
- Resources res = context.getResources();
167
- Configuration conf = res.getConfiguration();
168
- conf.locale = myLocale;
169
- res.updateConfiguration(conf, res.getDisplayMetrics());
170
- }
171
- } catch (Exception e) {
172
- Log.e("UqudoPlugin", e.getMessage(), e);
173
- }
163
+ UqudoSDK.setLocale(context, locale);
174
164
  }
175
165
 
176
166
  private void enroll(String message, Context context) {
@@ -220,12 +210,12 @@ public class UqudoIdPlugin extends CordovaPlugin {
220
210
  if (faceObject.has("allowClosedEyes") && faceObject.getBoolean("allowClosedEyes")) {
221
211
  faceBuilder.allowClosedEyes();
222
212
  }
223
- if (faceObject.has("obfuscationType")){
224
- if (faceObject.getString("obfuscationType").equals("FILLED")){
213
+ if (faceObject.has("obfuscationType")) {
214
+ if (faceObject.getString("obfuscationType").equals("FILLED")) {
225
215
  faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.FILLED);
226
- } else if (faceObject.getString("obfuscationType").equals("BLURRED")){
216
+ } else if (faceObject.getString("obfuscationType").equals("BLURRED")) {
227
217
  faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.BLURRED);
228
- } else if (faceObject.getString("obfuscationType").equals("FILLED_WHITE")){
218
+ } else if (faceObject.getString("obfuscationType").equals("FILLED_WHITE")) {
229
219
  faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.FILLED_WHITE);
230
220
  }
231
221
  }
@@ -233,7 +223,7 @@ public class UqudoIdPlugin extends CordovaPlugin {
233
223
  if (faceObject.has("isOneToNVerificationEnabled") && faceObject.getBoolean("isOneToNVerificationEnabled")) {
234
224
  faceBuilder.enableOneToNVerification();
235
225
  }
236
-
226
+
237
227
  if (faceObject.has("enableActiveLiveness") && faceObject.getBoolean("enableActiveLiveness")) {
238
228
  LivenessGesture disableGesture = null;
239
229
  if (faceObject.has("disableLivenessGesture")) {
@@ -345,20 +335,30 @@ public class UqudoIdPlugin extends CordovaPlugin {
345
335
  Document document = documentBuilder.build();
346
336
  enrollment.add(document);
347
337
  }
348
- if (json.has("appearanceMode")) {
349
- if ("LIGHT".equals(json.getString("appearanceMode"))) {
350
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
351
- } else if ("DARK".equals(json.getString("appearanceMode"))) {
352
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
353
- } else if ("SYSTEM".equals(json.getString("appearanceMode"))) {
354
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
338
+ this.cordova.getActivity().runOnUiThread(new Runnable() {
339
+ @Override
340
+ public void run() {
341
+ try {
342
+ if (json.has("appearanceMode")) {
343
+ if ("LIGHT".equals(json.getString("appearanceMode"))) {
344
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
345
+ } else if ("DARK".equals(json.getString("appearanceMode"))) {
346
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
347
+ } else if ("SYSTEM".equals(json.getString("appearanceMode"))) {
348
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
349
+ }
350
+ } else {
351
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
352
+ }
353
+ Intent intent = enrollment.build(context);
354
+ UqudoIdPlugin.this.cordova.setActivityResultCallback(UqudoIdPlugin.this);
355
+ UqudoIdPlugin.this.cordova.startActivityForResult(UqudoIdPlugin.this, intent, REQUEST_CODE_ENROLLMENT);
356
+ } catch (Exception e) {
357
+ Log.d("UqudoPlugin", e.getMessage(), e);
358
+ sendError(SessionStatusCode.UNEXPECTED_ERROR.name(), e.getMessage(), null);
359
+ }
355
360
  }
356
- } else {
357
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
358
- }
359
- Intent intent = enrollment.build(context);
360
- cordova.setActivityResultCallback(this);
361
- cordova.startActivityForResult(this, intent, REQUEST_CODE_ENROLLMENT);
361
+ });
362
362
  } catch (Exception e) {
363
363
  Log.d("UqudoPlugin", e.getMessage(), e);
364
364
  sendError(SessionStatusCode.UNEXPECTED_ERROR.name(), e.getMessage(), null);
@@ -392,25 +392,35 @@ public class UqudoIdPlugin extends CordovaPlugin {
392
392
  }
393
393
  if (json.has("allowClosedEyes") && json.getBoolean("allowClosedEyes")) {
394
394
  recovery.allowClosedEyes();
395
- }
395
+ }
396
396
 
397
397
  if (json.has("isReturnDataForIncompleteSession") && json.getBoolean("isReturnDataForIncompleteSession")) {
398
398
  recovery.returnDataForIncompleteSession();
399
399
  }
400
- if (json.has("appearanceMode")) {
401
- if ("LIGHT".equals(json.getString("appearanceMode"))) {
402
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
403
- } else if ("DARK".equals(json.getString("appearanceMode"))) {
404
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
405
- } else if ("SYSTEM".equals(json.getString("appearanceMode"))) {
406
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
400
+ this.cordova.getActivity().runOnUiThread(new Runnable() {
401
+ @Override
402
+ public void run() {
403
+ try {
404
+ if (json.has("appearanceMode")) {
405
+ if ("LIGHT".equals(json.getString("appearanceMode"))) {
406
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
407
+ } else if ("DARK".equals(json.getString("appearanceMode"))) {
408
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
409
+ } else if ("SYSTEM".equals(json.getString("appearanceMode"))) {
410
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
411
+ }
412
+ } else {
413
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
414
+ }
415
+ Intent intent = recovery.build(context);
416
+ UqudoIdPlugin.this.cordova.setActivityResultCallback(UqudoIdPlugin.this);
417
+ UqudoIdPlugin.this.cordova.startActivityForResult(UqudoIdPlugin.this, intent, REQUEST_CODE_ACCOUNT_RECOVERY);
418
+ } catch (Exception e) {
419
+ Log.d("UqudoPlugin", e.getMessage(), e);
420
+ sendError(SessionStatusCode.UNEXPECTED_ERROR.name(), e.getMessage(), null);
421
+ }
407
422
  }
408
- } else {
409
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
410
- }
411
- Intent intent = recovery.build(context);
412
- cordova.setActivityResultCallback(this);
413
- cordova.startActivityForResult(this, intent, REQUEST_CODE_ACCOUNT_RECOVERY);
423
+ });
414
424
  } catch (Exception e) {
415
425
  Log.d("UqudoPlugin", e.getMessage(), e);
416
426
  sendError(SessionStatusCode.UNEXPECTED_ERROR.name(), e.getMessage(), null);
@@ -447,16 +457,16 @@ public class UqudoIdPlugin extends CordovaPlugin {
447
457
  }
448
458
  if (json.has("allowClosedEyes") && json.getBoolean("allowClosedEyes")) {
449
459
  faceSessionBuilder.allowClosedEyes();
450
- }
460
+ }
451
461
  if (json.has("isReturnDataForIncompleteSession") && json.getBoolean("isReturnDataForIncompleteSession")) {
452
462
  faceSessionBuilder.returnDataForIncompleteSession();
453
463
  }
454
- if (json.has("obfuscationType")){
455
- if (json.getString("obfuscationType").equals("FILLED")){
464
+ if (json.has("obfuscationType")) {
465
+ if (json.getString("obfuscationType").equals("FILLED")) {
456
466
  faceSessionBuilder.enableAuditTrailImageObfuscation(ObfuscationType.FILLED);
457
- } else if (json.getString("obfuscationType").equals("BLURRED")){
467
+ } else if (json.getString("obfuscationType").equals("BLURRED")) {
458
468
  faceSessionBuilder.enableAuditTrailImageObfuscation(ObfuscationType.BLURRED);
459
- } else if (json.getString("obfuscationType").equals("FILLED_WHITE")){
469
+ } else if (json.getString("obfuscationType").equals("FILLED_WHITE")) {
460
470
  faceSessionBuilder.enableAuditTrailImageObfuscation(ObfuscationType.FILLED_WHITE);
461
471
  }
462
472
  }
@@ -469,21 +479,32 @@ public class UqudoIdPlugin extends CordovaPlugin {
469
479
  }
470
480
  }
471
481
 
472
- if (json.has("appearanceMode")) {
473
- if ("LIGHT".equals(json.getString("appearanceMode"))) {
474
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
475
- } else if ("DARK".equals(json.getString("appearanceMode"))) {
476
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
477
- } else if ("SYSTEM".equals(json.getString("appearanceMode"))) {
478
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
482
+ this.cordova.getActivity().runOnUiThread(new Runnable() {
483
+ @Override
484
+ public void run() {
485
+ try {
486
+ if (json.has("appearanceMode")) {
487
+ if ("LIGHT".equals(json.getString("appearanceMode"))) {
488
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
489
+ } else if ("DARK".equals(json.getString("appearanceMode"))) {
490
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
491
+ } else if ("SYSTEM".equals(json.getString("appearanceMode"))) {
492
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
493
+ }
494
+ } else {
495
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
496
+ }
497
+
498
+ Intent intent = faceSessionBuilder.build(context);
499
+ UqudoIdPlugin.this.cordova.setActivityResultCallback(UqudoIdPlugin.this);
500
+ UqudoIdPlugin.this.cordova.startActivityForResult(UqudoIdPlugin.this, intent, REQUEST_CODE_FACE_SESSION);
501
+ } catch (Exception e) {
502
+ Log.d("UqudoPlugin", e.getMessage(), e);
503
+ sendError(SessionStatusCode.UNEXPECTED_ERROR.name(), e.getMessage(), null);
504
+ }
479
505
  }
480
- } else {
481
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
482
- }
506
+ });
483
507
 
484
- Intent intent = faceSessionBuilder.build(context);
485
- cordova.setActivityResultCallback(this);
486
- cordova.startActivityForResult(this, intent, REQUEST_CODE_FACE_SESSION);
487
508
  } catch (Exception e) {
488
509
  Log.d("UqudoPlugin", e.getMessage(), e);
489
510
  sendError(SessionStatusCode.UNEXPECTED_ERROR.name(), e.getMessage(), null);
@@ -529,19 +550,19 @@ public class UqudoIdPlugin extends CordovaPlugin {
529
550
  if (faceObject.has("allowClosedEyes") && faceObject.getBoolean("allowClosedEyes")) {
530
551
  faceBuilder.allowClosedEyes();
531
552
  }
532
- if (faceObject.has("obfuscationType")){
533
- if (faceObject.getString("obfuscationType").equals("FILLED")){
553
+ if (faceObject.has("obfuscationType")) {
554
+ if (faceObject.getString("obfuscationType").equals("FILLED")) {
534
555
  faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.FILLED);
535
- } else if (faceObject.getString("obfuscationType").equals("BLURRED")){
556
+ } else if (faceObject.getString("obfuscationType").equals("BLURRED")) {
536
557
  faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.BLURRED);
537
- } else if (faceObject.getString("obfuscationType").equals("FILLED_WHITE")){
558
+ } else if (faceObject.getString("obfuscationType").equals("FILLED_WHITE")) {
538
559
  faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.FILLED_WHITE);
539
560
  }
540
561
  }
541
562
  if (faceObject.has("isOneToNVerificationEnabled") && faceObject.getBoolean("isOneToNVerificationEnabled")) {
542
563
  faceBuilder.enableOneToNVerification();
543
564
  }
544
-
565
+
545
566
  if (faceObject.has("enableActiveLiveness") && faceObject.getBoolean("enableActiveLiveness")) {
546
567
  LivenessGesture disableGesture = null;
547
568
  if (faceObject.has("disableLivenessGesture")) {
@@ -582,20 +603,32 @@ public class UqudoIdPlugin extends CordovaPlugin {
582
603
  }
583
604
  lookup.setToken(json.getString("authorizationToken"));
584
605
  lookup.setDocumentType(DocumentType.valueOf(json.getString("documentType")));
585
- if (json.has("appearanceMode")) {
586
- if ("LIGHT".equals(json.getString("appearanceMode"))) {
587
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
588
- } else if ("DARK".equals(json.getString("appearanceMode"))) {
589
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
590
- } else if ("SYSTEM".equals(json.getString("appearanceMode"))) {
591
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
592
- }
593
- } else {
594
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
595
- }
596
- Intent intent = lookup.build(context);
597
- cordova.setActivityResultCallback(this);
598
- cordova.startActivityForResult(this, intent, REQUEST_CODE_LOOKUP);
606
+
607
+ this.cordova.getActivity().runOnUiThread(new Runnable() {
608
+ @Override
609
+ public void run() {
610
+ try {
611
+ if (json.has("appearanceMode")) {
612
+ if ("LIGHT".equals(json.getString("appearanceMode"))) {
613
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
614
+ } else if ("DARK".equals(json.getString("appearanceMode"))) {
615
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
616
+ } else if ("SYSTEM".equals(json.getString("appearanceMode"))) {
617
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
618
+ }
619
+ } else {
620
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
621
+ }
622
+ Intent intent = lookup.build(context);
623
+ UqudoIdPlugin.this.cordova.setActivityResultCallback(UqudoIdPlugin.this);
624
+ UqudoIdPlugin.this.cordova.startActivityForResult(UqudoIdPlugin.this, intent, REQUEST_CODE_LOOKUP);
625
+ } catch (Exception e) {
626
+ Log.d("UqudoPlugin", e.getMessage(), e);
627
+ sendError(SessionStatusCode.UNEXPECTED_ERROR.name(), e.getMessage(), null);
628
+ }
629
+ }
630
+ });
631
+
599
632
  } catch (Exception e) {
600
633
  Log.d("UqudoPlugin", e.getMessage(), e);
601
634
  sendError(SessionStatusCode.UNEXPECTED_ERROR.name(), e.getMessage(), null);
@@ -610,7 +643,7 @@ public class UqudoIdPlugin extends CordovaPlugin {
610
643
  super.onActivityResult(requestCode, resultCode, data);
611
644
 
612
645
  if (requestCode == REQUEST_CODE_ENROLLMENT || requestCode == REQUEST_CODE_ACCOUNT_RECOVERY
613
- || requestCode == REQUEST_CODE_FACE_SESSION || requestCode == REQUEST_CODE_LOOKUP) {
646
+ || requestCode == REQUEST_CODE_FACE_SESSION || requestCode == REQUEST_CODE_LOOKUP) {
614
647
  if (resultCode == Activity.RESULT_OK) {
615
648
  PluginResult result = new PluginResult(PluginResult.Status.OK, data.getStringExtra("data"));
616
649
  result.setKeepCallback(true);
@@ -631,51 +664,51 @@ public class UqudoIdPlugin extends CordovaPlugin {
631
664
  try {
632
665
  JSONObject json = new JSONObject(message);
633
666
  UqudoBuilder.Reading readingBuilder = new UqudoBuilder.Reading();
634
-
667
+
635
668
  if (json.has("authorizationToken")) {
636
669
  readingBuilder.setToken(json.getString("authorizationToken"));
637
670
  }
638
-
671
+
639
672
  if (json.has("sessionId")) {
640
673
  readingBuilder.setSessionId(json.getString("sessionId"));
641
674
  }
642
-
675
+
643
676
  if (json.has("userIdentifier")) {
644
677
  readingBuilder.setUserIdentifier(UUID.fromString(json.getString("userIdentifier")));
645
678
  }
646
-
679
+
647
680
  if (json.has("nonce")) {
648
681
  readingBuilder.setNonce(json.getString("nonce"));
649
682
  }
650
-
683
+
651
684
  if (json.has("documentType")) {
652
685
  readingBuilder.setDocumentType(DocumentType.valueOf(json.getString("documentType")));
653
686
  }
654
-
687
+
655
688
  if (json.has("documentNumber")) {
656
689
  readingBuilder.setDocumentNumber(json.getString("documentNumber"));
657
690
  }
658
-
691
+
659
692
  if (json.has("dateOfBirth")) {
660
693
  readingBuilder.setDateOfBirth(json.getString("dateOfBirth"));
661
694
  }
662
-
695
+
663
696
  if (json.has("dateOfExpiry")) {
664
697
  readingBuilder.setDateOfExpiry(json.getString("dateOfExpiry"));
665
698
  }
666
-
699
+
667
700
  if (json.has("mrz")) {
668
701
  readingBuilder.setMRZ(json.getString("mrz"));
669
702
  }
670
-
703
+
671
704
  if (json.has("isReturnDataForIncompleteSession") && json.getBoolean("isReturnDataForIncompleteSession")) {
672
705
  readingBuilder.returnDataForIncompleteSession();
673
706
  }
674
-
707
+
675
708
  if (json.has("isSecuredWindowsDisabled") && json.getBoolean("isSecuredWindowsDisabled")) {
676
709
  readingBuilder.disableSecureWindow();
677
710
  }
678
-
711
+
679
712
  if (json.has("facialRecognitionSpecification")) {
680
713
  FacialRecognitionConfigurationBuilder faceBuilder = new FacialRecognitionConfigurationBuilder();
681
714
  JSONObject faceObject = json.getJSONObject("facialRecognitionSpecification");
@@ -697,12 +730,12 @@ public class UqudoIdPlugin extends CordovaPlugin {
697
730
  if (faceObject.has("allowClosedEyes") && faceObject.getBoolean("allowClosedEyes")) {
698
731
  faceBuilder.allowClosedEyes();
699
732
  }
700
- if (faceObject.has("obfuscationType")){
701
- if (faceObject.getString("obfuscationType").equals("FILLED")){
733
+ if (faceObject.has("obfuscationType")) {
734
+ if (faceObject.getString("obfuscationType").equals("FILLED")) {
702
735
  faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.FILLED);
703
- } else if (faceObject.getString("obfuscationType").equals("BLURRED")){
736
+ } else if (faceObject.getString("obfuscationType").equals("BLURRED")) {
704
737
  faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.BLURRED);
705
- } else if (faceObject.getString("obfuscationType").equals("FILLED_WHITE")){
738
+ } else if (faceObject.getString("obfuscationType").equals("FILLED_WHITE")) {
706
739
  faceBuilder.enableAuditTrailImageObfuscation(ObfuscationType.FILLED_WHITE);
707
740
  }
708
741
  }
@@ -710,7 +743,7 @@ public class UqudoIdPlugin extends CordovaPlugin {
710
743
  if (faceObject.has("isOneToNVerificationEnabled") && faceObject.getBoolean("isOneToNVerificationEnabled")) {
711
744
  faceBuilder.enableOneToNVerification();
712
745
  }
713
-
746
+
714
747
  if (faceObject.has("enableActiveLiveness") && faceObject.getBoolean("enableActiveLiveness")) {
715
748
  LivenessGesture disableGesture = null;
716
749
  if (faceObject.has("disableLivenessGesture")) {
@@ -732,7 +765,7 @@ public class UqudoIdPlugin extends CordovaPlugin {
732
765
 
733
766
  readingBuilder.enableFacialRecognition(faceBuilder.build());
734
767
  }
735
-
768
+
736
769
  if (json.has("backgroundCheckConfiguration")) {
737
770
  BackgroundCheckConfigurationBuilder backgroundCheckConfigurationBuilder = new BackgroundCheckConfigurationBuilder();
738
771
  JSONObject backgroundObject = json.getJSONObject("backgroundCheckConfiguration");
@@ -750,26 +783,37 @@ public class UqudoIdPlugin extends CordovaPlugin {
750
783
  }
751
784
  readingBuilder.enableBackgroundCheck(backgroundCheckConfigurationBuilder.build());
752
785
  }
753
-
786
+
754
787
  if (json.has("isLookupEnabled") && json.getBoolean("isLookupEnabled")) {
755
788
  readingBuilder.enableLookup();
756
789
  }
757
-
758
- if (json.has("appearanceMode")) {
759
- if ("LIGHT".equals(json.getString("appearanceMode"))) {
760
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
761
- } else if ("DARK".equals(json.getString("appearanceMode"))) {
762
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
763
- } else if ("SYSTEM".equals(json.getString("appearanceMode"))) {
764
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
765
- }
766
- } else {
767
- AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
768
- }
769
-
770
- Intent intent = readingBuilder.build(context);
771
- cordova.setActivityResultCallback(this);
772
- cordova.startActivityForResult(this, intent, REQUEST_CODE_READING);
790
+
791
+ this.cordova.getActivity().runOnUiThread(new Runnable() {
792
+ @Override
793
+ public void run() {
794
+ try {
795
+ if (json.has("appearanceMode")) {
796
+ if ("LIGHT".equals(json.getString("appearanceMode"))) {
797
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
798
+ } else if ("DARK".equals(json.getString("appearanceMode"))) {
799
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
800
+ } else if ("SYSTEM".equals(json.getString("appearanceMode"))) {
801
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
802
+ }
803
+ } else {
804
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
805
+ }
806
+
807
+ Intent intent = readingBuilder.build(context);
808
+ UqudoIdPlugin.this.cordova.setActivityResultCallback(UqudoIdPlugin.this);
809
+ UqudoIdPlugin.this.cordova.startActivityForResult(UqudoIdPlugin.this, intent, REQUEST_CODE_READING);
810
+ } catch (Exception e) {
811
+ Log.d("UqudoPlugin", e.getMessage(), e);
812
+ sendError(SessionStatusCode.UNEXPECTED_ERROR.name(), e.getMessage(), null);
813
+ }
814
+ }
815
+ });
816
+
773
817
  } catch (Exception e) {
774
818
  Log.e("UqudoIdPlugin", e.getMessage(), e);
775
819
  sendError(SessionStatusCode.UNEXPECTED_ERROR.name(), e.getMessage(), null);
@@ -1,5 +1,5 @@
1
1
  repositories { maven { url "https://rm.dev.uqudo.io/repository/uqudo-public/" } }
2
2
 
3
3
  dependencies {
4
- implementation 'io.uqudo.sdk:Uqudo:3.7.0'
4
+ implementation 'io.uqudo.sdk:Uqudo:3.8.0'
5
5
  }
@@ -140,7 +140,10 @@ UqudoSDK.prototype.DocumentType = Object.freeze(
140
140
  IDN_ID: 'IDN_ID',
141
141
  IRQ_ID_NATIONAL: 'IRQ_ID_NATIONAL',
142
142
  IRQ_ID_RESIDENT: 'IRQ_ID_RESIDENT',
143
- MAR_ID: 'MAR_ID'
143
+ MAR_ID: 'MAR_ID',
144
+ YEM_ID: 'YEM_ID',
145
+ JOR_ID: 'JOR_ID',
146
+ SYR_ID: 'SYR_ID'
144
147
  }
145
148
  );
146
149
  var BackgroundCheckType = Object.freeze(