accurascan_kyc 1.3.3 → 1.3.5

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.
@@ -23,7 +23,8 @@ Pod::Spec.new do |s|
23
23
  s.static_framework = true
24
24
  # s.dependency "AccuraKYC","4.0.2"
25
25
  # s.dependency "AccuraKYC","4.0.4"
26
- s.dependency 'AccuraKYC_Enc', '4.1.3'
26
+ # s.dependency 'AccuraKYC', '4.1.4'
27
+ s.dependency 'AccuraKYC', '4.2.0'
27
28
  # Don't install the dependencies when we run `pod install` in the old architecture.
28
29
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
29
30
  s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
@@ -64,13 +64,13 @@ android {
64
64
  packagingOptions {
65
65
  pickFirst 'lib/arm64-v8a/libcrypto.so'
66
66
  pickFirst 'lib/arm64-v8a/libssl.so'
67
-
67
+
68
68
  pickFirst 'lib/armeabi-v7a/libcrypto.so'
69
69
  pickFirst 'lib/armeabi-v7a/libssl.so'
70
-
70
+
71
71
  pickFirst 'lib/x86/libcrypto.so'
72
72
  pickFirst 'lib/x86/libssl.so'
73
-
73
+
74
74
  pickFirst 'lib/x86_64/libcrypto.so'
75
75
  pickFirst 'lib/x86_64/libssl.so'
76
76
  }
@@ -100,11 +100,11 @@ dependencies {
100
100
  implementation 'androidx.appcompat:appcompat:1.6.0'
101
101
  implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
102
102
  // Update OCR
103
- implementation 'com.github.accurascan:AccuraOCR:6.1.6'
103
+ implementation 'com.github.accurascan:AccuraOCR:6.1.10'
104
104
  // FaceMatch has no issue
105
105
  implementation 'com.github.accurascan:AccuraFaceMatch:3.2.5'
106
106
  // Update Liveness
107
- implementation 'com.github.accurascan:Liveness-Android:3.4.1'
107
+ implementation 'com.github.accurascan:Liveness-Android:3.4.7'
108
108
  implementation 'com.squareup.picasso:picasso:2.71828'
109
109
  }
110
110
 
@@ -772,7 +772,7 @@ public class OcrActivity extends SensorsActivity implements OcrCallback {
772
772
  if (frontData != null) {
773
773
  if(isDocLiveness){
774
774
  try {
775
- frontResult.put("Document Liveness", frontData.docLiveness);
775
+ frontResult.put("ID Liveness", frontData.IDLivenessScore);
776
776
  } catch (JSONException e) {
777
777
  e.printStackTrace(); // Handle the exception here (e.g., log the error or notify the user)
778
778
  }
@@ -803,7 +803,7 @@ public class OcrActivity extends SensorsActivity implements OcrCallback {
803
803
  if (backData != null) {
804
804
  if(isDocLiveness){
805
805
  try {
806
- backResult.put("Document Liveness", backData.docLiveness);
806
+ backResult.put("ID Liveness", backData.IDLivenessScore);
807
807
  } catch (JSONException e) {
808
808
  e.printStackTrace(); // Handle the exception here (e.g., log the error or notify the user)
809
809
  }
@@ -1365,10 +1365,10 @@ public class OcrActivity extends SensorsActivity implements OcrCallback {
1365
1365
  frontResult.put("MRZ", recogResult.lines);
1366
1366
 
1367
1367
  if(isDocLiveness && recogType == RecogType.MRZ){
1368
- frontResult.put("Document Liveness Front", recogResult.docfrontliveness);
1368
+ frontResult.put("ID Liveness Front", recogResult.FrontIDLivenessScore);
1369
1369
 
1370
- if(recogResult.docbackliveness != null && isBacksideAvail){
1371
- frontResult.put("Document Liveness Back", recogResult.docbackliveness);
1370
+ if(recogResult.BackIDLivenessScore != null && isBacksideAvail){
1371
+ frontResult.put("ID Liveness Back", recogResult.BackIDLivenessScore);
1372
1372
  }
1373
1373
  }
1374
1374
 
@@ -14,6 +14,7 @@ import android.widget.Toast;
14
14
  import androidx.annotation.Nullable;
15
15
 
16
16
  import com.accurascan.facedetection.LivenessCustomization;
17
+ import com.accurascan.facedetection.LivenessMode;
17
18
  import com.accurascan.facedetection.SelfieCameraActivity;
18
19
  import com.accurascan.facedetection.model.AccuraVerificationResult;
19
20
  import com.accurascan.facematch.util.BitmapHelper;
@@ -102,7 +103,7 @@ public class OcrResultActivity extends Activity implements FaceCallback {
102
103
  finish();
103
104
  }
104
105
  if (result.getLivenessResult().getLivenessStatus()) {
105
- String lvscore = result.getLivenessResult().getLivenessScore() * 100 + "";
106
+ String lvscore = result.getLivenessResult().getLivenessScore() + "";
106
107
  try {
107
108
  results.put("score",lvscore);
108
109
  } catch (JSONException e) {
@@ -125,7 +126,7 @@ public class OcrResultActivity extends Activity implements FaceCallback {
125
126
  finish();
126
127
  }else{
127
128
  if (result.getLivenessResult().getLivenessStatus()) {
128
- String lvscore = result.getLivenessResult().getLivenessScore() * 100 + "";
129
+ String lvscore = result.getLivenessResult().getLivenessScore() + "";
129
130
  try {
130
131
  results.put("score",lvscore);
131
132
  results.put("detect", AccurascanKycModule.getImageUri(result.getFaceBiometrics(), "detect", fileDir));
@@ -245,11 +246,37 @@ public class OcrResultActivity extends Activity implements FaceCallback {
245
246
  // private void performClick(boolean isFaceMatch, boolean isLiveness) {
246
247
  // if (isFaceMatch) openCamera();
247
248
  // else if (isLiveness) openLivenessCamera();
248
- // }
249
+ // }setEnableFaceMovement setEnableOralVerification
249
250
 
250
251
  private void openLivenessCamera() {
251
252
  LivenessCustomization livenessCustomization = new LivenessCustomization();
252
253
 
254
+ // System.out.println("livenessConfig3: " );
255
+ try {
256
+ boolean enableFaceMovement = false;
257
+ boolean enableOralVerification = false;
258
+ if(livenessConfig.has("setEnableFaceMovement") ){
259
+ enableFaceMovement = livenessConfig.getBoolean("setEnableFaceMovement");
260
+
261
+ }
262
+ if(livenessConfig.has("setEnableOralVerification") ){
263
+ enableOralVerification = livenessConfig.getBoolean("setEnableOralVerification");
264
+
265
+ }
266
+
267
+ if(enableFaceMovement && enableOralVerification){
268
+ livenessCustomization.livenessMode = LivenessMode.ALL;
269
+ }else if(enableFaceMovement && !enableOralVerification){
270
+ livenessCustomization.livenessMode = LivenessMode.FACE_3D;
271
+ }else if(!enableFaceMovement && enableOralVerification){
272
+ livenessCustomization.livenessMode = LivenessMode.VOICE;
273
+ }else{
274
+ livenessCustomization.livenessMode = LivenessMode.DEFAULT;
275
+ }
276
+ } catch (JSONException e) {
277
+ e.printStackTrace();
278
+ }
279
+
253
280
  try {
254
281
  if(livenessConfig.has("backGroundColor")){
255
282
  livenessCustomization.backGroundColor = Color.parseColor(livenessConfig.getString("backGroundColor"));
@@ -407,15 +434,15 @@ public class OcrResultActivity extends Activity implements FaceCallback {
407
434
  }else {
408
435
  livenessCustomization.setLowLightTolerence(-1/*lowLightTolerence*/);
409
436
  }
410
- // if (livenessConfig.has("setApiKey")){
411
- //// try {
412
- //// livenessCustomization.setApiKey(livenessConfig.getString("setApiKey"));
413
- //// } catch (JSONException e) {
414
- //// e.printStackTrace();
415
- //// }
416
- //// }else {
417
- //// livenessCustomization.setApiKey("");
418
- //// }
437
+ if (livenessConfig.has("setApiKey")){
438
+ try {
439
+ livenessCustomization.setApiKey(livenessConfig.getString("setApiKey"));
440
+ } catch (JSONException e) {
441
+ e.printStackTrace();
442
+ }
443
+ }else {
444
+ livenessCustomization.setApiKey("");
445
+ }
419
446
  if (livenessConfig.has("setfeedbackDialogMessage")){
420
447
  try {
421
448
  livenessCustomization.feedbackDialogMessage = livenessConfig.getString("setfeedbackDialogMessage");
@@ -34,6 +34,21 @@ class LVController: UIViewController,LivenessData,FacematchData
34
34
  super.viewWillAppear(animated)
35
35
 
36
36
  if isLiveness{
37
+
38
+ if livenessConfig["setEnableFaceMovement"] != nil {
39
+ let val = (livenessConfig["setEnableFaceMovement"] as? Bool)!
40
+ liveness.enableFaceMovement(val)
41
+ }else{
42
+ liveness.enableFaceMovement(false)
43
+ }
44
+
45
+ if livenessConfig["setEnableOralVerification"] != nil {
46
+ let val = (livenessConfig["setEnableOralVerification"] as? Bool)!
47
+ liveness.enableOralVerification(val)
48
+ }else{
49
+ liveness.enableOralVerification(false)
50
+ }
51
+
37
52
 
38
53
  if livenessConfig["backGroundColor"] != nil{
39
54
  liveness.setBackGroundColor(livenessConfig["backGroundColor"] as! String)
@@ -143,7 +158,7 @@ class LVController: UIViewController,LivenessData,FacematchData
143
158
  // 0 for clean face and 100 for Blurry face
144
159
 
145
160
  // Set min and max percentage for glare
146
- liveness.evaluateServerTrustWIthSSLPinning(false)
161
+ // liveness.evaluateServerTrustWIthSSLPinning(false)
147
162
 
148
163
  if isLiveness{
149
164
  isLiveness = false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "accurascan_kyc",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "Accura Scan",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",