From c41be4a35169651889ffb1321e63ec7f2c20c120 Mon Sep 17 00:00:00 2001 From: mparadina Date: Tue, 14 Nov 2023 13:28:40 +0100 Subject: [PATCH] Minor changes --- .../BlinkIdMultiSideRecognizerSerialization.java | 4 +++- .../BlinkIdSingleSideRecognizerSerialization.java | 4 +++- BlinkID/www/blinkIdScanner.js | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/BlinkID/src/android/java/com/microblink/blinkid/plugins/cordova/recognizers/serialization/BlinkIdMultiSideRecognizerSerialization.java b/BlinkID/src/android/java/com/microblink/blinkid/plugins/cordova/recognizers/serialization/BlinkIdMultiSideRecognizerSerialization.java index 20274cb..970c520 100644 --- a/BlinkID/src/android/java/com/microblink/blinkid/plugins/cordova/recognizers/serialization/BlinkIdMultiSideRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/microblink/blinkid/plugins/cordova/recognizers/serialization/BlinkIdMultiSideRecognizerSerialization.java @@ -67,7 +67,9 @@ public JSONObject serializeResult(Recognizer recognizer) { jsonResult.put("expired", result.isExpired()); jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); jsonResult.put("faceImageLocation", SerializationUtils.serializeRectangle(result.getFaceImageLocation())); - jsonResult.put("faceImageSide", SerializationUtils.serializeEnum(result.getFaceImageSide())); + if (result.getFaceImageSide() != null) { + jsonResult.put("faceImageSide", SerializationUtils.serializeEnum(result.getFaceImageSide())); + } jsonResult.put("fathersName", BlinkIDSerializationUtils.serializeStringResult(result.getFathersName())); jsonResult.put("firstName", BlinkIDSerializationUtils.serializeStringResult(result.getFirstName())); jsonResult.put("frontAdditionalProcessingInfo", BlinkIDSerializationUtils.serializeAdditionalProcessingInfo(result.getFrontAdditionalProcessingInfo())); diff --git a/BlinkID/src/android/java/com/microblink/blinkid/plugins/cordova/recognizers/serialization/BlinkIdSingleSideRecognizerSerialization.java b/BlinkID/src/android/java/com/microblink/blinkid/plugins/cordova/recognizers/serialization/BlinkIdSingleSideRecognizerSerialization.java index a321add..3c3e878 100644 --- a/BlinkID/src/android/java/com/microblink/blinkid/plugins/cordova/recognizers/serialization/BlinkIdSingleSideRecognizerSerialization.java +++ b/BlinkID/src/android/java/com/microblink/blinkid/plugins/cordova/recognizers/serialization/BlinkIdSingleSideRecognizerSerialization.java @@ -60,7 +60,9 @@ public JSONObject serializeResult(Recognizer recognizer) { jsonResult.put("expired", result.isExpired()); jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); jsonResult.put("faceImageLocation", SerializationUtils.serializeRectangle(result.getFaceImageLocation())); - jsonResult.put("faceImageSide", SerializationUtils.serializeEnum(result.getFaceImageSide())); + if (result.getFaceImageSide() != null) { + jsonResult.put("faceImageSide", SerializationUtils.serializeEnum(result.getFaceImageSide())); + } jsonResult.put("fathersName", BlinkIDSerializationUtils.serializeStringResult(result.getFathersName())); jsonResult.put("firstName", BlinkIDSerializationUtils.serializeStringResult(result.getFirstName())); jsonResult.put("fullDocumentImage", SerializationUtils.encodeImageBase64(result.getFullDocumentImage())); diff --git a/BlinkID/www/blinkIdScanner.js b/BlinkID/www/blinkIdScanner.js index b9762bc..e78b8cd 100644 --- a/BlinkID/www/blinkIdScanner.js +++ b/BlinkID/www/blinkIdScanner.js @@ -2593,7 +2593,7 @@ function BlinkIdMultiSideRecognizerResult(nativeResult) { /** * Detailed info on data match. */ - this.dataMatchResult = nativeResult.dataMatchResult; + this.dataMatch = nativeResult.dataMatch; /** * The date of birth of the document owner.