From f2cf3318f2a3ceff5ea90740fcf30f59166e76ab Mon Sep 17 00:00:00 2001 From: mparadina Date: Mon, 15 Jul 2024 12:42:02 +0200 Subject: [PATCH 1/3] v6.8.0 release --- .../BlinkIdOverlaySettingsSerialization.java | 23 +++++++- .../BlinkIDSerializationUtils.java | 3 +- ...inkIdMultiSideRecognizerSerialization.java | 6 ++- ...nkIdSingleSideRecognizerSerialization.java | 6 ++- .../MBBlinkIDSerializationUtils.m | 6 ++- .../MBBlinkIdOverlaySettingsSerialization.m | 21 ++++++++ .../MBBlinkIdMultiSideRecognizerWrapper.m | 31 ++++++++--- .../MBBlinkIdSingleSideRecognizerWrapper.m | 31 ++++++++--- BlinkID/lib/overlays/blinkid_overlays.dart | 24 +++++++++ BlinkID/lib/overlays/blinkid_overlays.g.dart | 41 ++++++++++++-- BlinkID/lib/recognizer.g.dart | 3 +- .../blink_id_multi_side_recognizer.dart | 35 +++++++++--- .../blink_id_multi_side_recognizer.g.dart | 28 +++++++--- .../blink_id_single_side_recognizer.dart | 35 +++++++++--- .../blink_id_single_side_recognizer.g.dart | 26 +++++++-- .../document_face_recognizer.g.dart | 6 +-- .../mrtd_combined_recognizer.g.dart | 6 +-- .../lib/recognizers/mrtd_recognizer.g.dart | 2 +- .../recognizers/passport_recognizer.g.dart | 4 +- .../usdl_combined_recognizer.g.dart | 6 +-- .../lib/recognizers/visa_recognizer.g.dart | 4 +- BlinkID/lib/types.dart | 54 +++++++++++++++++-- BlinkID/lib/types.g.dart | 5 +- 23 files changed, 340 insertions(+), 66 deletions(-) diff --git a/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/overlays/serialization/BlinkIdOverlaySettingsSerialization.java b/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/overlays/serialization/BlinkIdOverlaySettingsSerialization.java index d6ffb24..7162b1d 100644 --- a/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/overlays/serialization/BlinkIdOverlaySettingsSerialization.java +++ b/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/overlays/serialization/BlinkIdOverlaySettingsSerialization.java @@ -9,7 +9,8 @@ import com.microblink.blinkid.flutter.overlays.OverlaySettingsSerialization; import com.microblink.blinkid.flutter.SerializationUtils; import com.microblink.blinkid.locale.LanguageUtils; - +import com.microblink.blinkid.hardware.camera.VideoResolutionPreset; +import com.microblink.blinkid.uisettings.CameraSettings; import org.json.JSONObject; @@ -19,8 +20,9 @@ public final class BlinkIdOverlaySettingsSerialization implements OverlaySetting @Override public UISettings createUISettings(Context context, JSONObject jsonUISettings, RecognizerBundle recognizerBundle) { BlinkIdUISettings settings = new BlinkIdUISettings(recognizerBundle); + OverlaySerializationUtils.extractCommonUISettings(jsonUISettings, settings); - + boolean requireDocumentSidesDataMatch = jsonUISettings.optBoolean("requireDocumentSidesDataMatch", true); settings.setDocumentDataMatchRequired(requireDocumentSidesDataMatch); @@ -51,6 +53,15 @@ public UISettings createUISettings(Context context, JSONObject jsonUISettings, R long backSideScanningTimeoutMilliseconds = jsonUISettings.optLong("backSideScanningTimeoutMilliseconds", 17000); settings.setBackSideScanningTimeoutMs(backSideScanningTimeoutMilliseconds); + int videoResolutionPreset = jsonUISettings.optInt("androidCameraResolutionPreset", VideoResolutionPreset.VIDEO_RESOLUTION_DEFAULT.ordinal()); + + boolean androidLegacyCameraApi = jsonUISettings.optBoolean("enableAndroidLegacyCameraApi", false); + + settings.setCameraSettings(new CameraSettings.Builder() + .setVideoResolutionPreset(VideoResolutionPreset.values()[videoResolutionPreset]) + .setForceLegacyApi(androidLegacyCameraApi) + .build()); + ReticleOverlayStrings.Builder overlasStringsBuilder = new ReticleOverlayStrings.Builder(context); String firstSideInstructionsText = getStringFromJSONObject(jsonUISettings, "firstSideInstructionsText"); @@ -105,6 +116,14 @@ public UISettings createUISettings(Context context, JSONObject jsonUISettings, R if (errorDocumentTooCloseToEdge != null) { overlasStringsBuilder.setErrorDocumentTooCloseToEdge(errorDocumentTooCloseToEdge); } + String errorBlurDetected = getStringFromJSONObject(jsonUISettings, "errorBlurDetected"); + if (errorBlurDetected != null) { + overlasStringsBuilder.setErrorBlurDetected(errorBlurDetected); + } + String errorGlareDetected = getStringFromJSONObject(jsonUISettings, "errorGlareDetected"); + if (errorGlareDetected != null) { + overlasStringsBuilder.setErrorGlareDetected(errorGlareDetected); + } String language = getStringFromJSONObject(jsonUISettings, "language"); if (language != null) { String country = getStringFromJSONObject(jsonUISettings, "country"); diff --git a/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/recognizers/serialization/BlinkIDSerializationUtils.java b/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/recognizers/serialization/BlinkIDSerializationUtils.java index 412a416..c0bee9d 100644 --- a/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/recognizers/serialization/BlinkIDSerializationUtils.java +++ b/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/recognizers/serialization/BlinkIDSerializationUtils.java @@ -217,7 +217,6 @@ public static JSONObject serializeClassInfo(ClassInfo classInfo) throws JSONExce public static JSONObject serializeImageAnalysisResult(ImageAnalysisResult imageAnalysisResult) throws JSONException { JSONObject jsonImageAnalysis = new JSONObject(); - jsonImageAnalysis.put("blurred", imageAnalysisResult.isBlurred()); jsonImageAnalysis.put("documentImageColorStatus", SerializationUtils.serializeEnum(imageAnalysisResult.getDocumentImageColorStatus())); jsonImageAnalysis.put("documentImageMoireStatus", SerializationUtils.serializeEnum(imageAnalysisResult.getDocumentImageMoireStatus())); jsonImageAnalysis.put("faceDetectionStatus", SerializationUtils.serializeEnum(imageAnalysisResult.getFaceDetectionStatus())); @@ -226,6 +225,8 @@ public static JSONObject serializeImageAnalysisResult(ImageAnalysisResult imageA jsonImageAnalysis.put("cardRotation", BlinkIDSerializationUtils.serializeCardRotation(imageAnalysisResult.getCardRotation())); jsonImageAnalysis.put("cardOrientation", SerializationUtils.serializeEnum(imageAnalysisResult.getCardOrientation())); jsonImageAnalysis.put("realIdDetectionStatus", SerializationUtils.serializeEnum(imageAnalysisResult.getRealIdDetectionStatus())); + jsonImageAnalysis.put("blurDetected", imageAnalysisResult.isBlurDetected()); + jsonImageAnalysis.put("glareDetected", imageAnalysisResult.isGlareDetected()); return jsonImageAnalysis; } diff --git a/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/recognizers/serialization/BlinkIdMultiSideRecognizerSerialization.java b/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/recognizers/serialization/BlinkIdMultiSideRecognizerSerialization.java index c76f7bf..1d45dd5 100644 --- a/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/recognizers/serialization/BlinkIdMultiSideRecognizerSerialization.java +++ b/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/recognizers/serialization/BlinkIdMultiSideRecognizerSerialization.java @@ -13,14 +13,17 @@ public final class BlinkIdMultiSideRecognizerSerialization implements Recognizer public Recognizer createRecognizer(JSONObject jsonObject) { com.microblink.blinkid.entities.recognizers.blinkid.generic.BlinkIdMultiSideRecognizer recognizer = new com.microblink.blinkid.entities.recognizers.blinkid.generic.BlinkIdMultiSideRecognizer(); recognizer.setAdditionalAnonymization(BlinkIDSerializationUtils.deserializeClassAnonymizationSettings(jsonObject.optJSONArray("additionalAnonymization"))); - recognizer.setAllowBlurFilter(jsonObject.optBoolean("allowBlurFilter", true)); recognizer.setAllowUncertainFrontSideScan(jsonObject.optBoolean("allowUncertainFrontSideScan", false)); recognizer.setAllowUnparsedMrzResults(jsonObject.optBoolean("allowUnparsedMrzResults", false)); recognizer.setAllowUnverifiedMrzResults(jsonObject.optBoolean("allowUnverifiedMrzResults", true)); recognizer.setAnonymizationMode(com.microblink.blinkid.entities.recognizers.blinkid.generic.AnonymizationMode.values()[jsonObject.optInt("anonymizationMode", 3)]); + recognizer.setBlurStrictnessLevel(com.microblink.blinkid.entities.recognizers.blinkid.generic.imageanalysis.StrictnessLevel.values()[jsonObject.optInt("blurStrictnessLevel", 1)]); + recognizer.setEnableBlurFilter(jsonObject.optBoolean("enableBlurFilter", true)); + recognizer.setEnableGlareFilter(jsonObject.optBoolean("enableGlareFilter", true)); recognizer.setFaceImageDpi(jsonObject.optInt("faceImageDpi", 250)); recognizer.setFullDocumentImageDpi(jsonObject.optInt("fullDocumentImageDpi", 250)); recognizer.setFullDocumentImageExtensionFactors(SerializationUtils.deserializeExtensionFactors(jsonObject.optJSONObject("fullDocumentImageExtensionFactors"))); + recognizer.setGlareStrictnessLevel(com.microblink.blinkid.entities.recognizers.blinkid.generic.imageanalysis.StrictnessLevel.values()[jsonObject.optInt("glareStrictnessLevel", 1)]); recognizer.setMaxAllowedMismatchesPerField(jsonObject.optInt("maxAllowedMismatchesPerField", 0)); recognizer.setPaddingEdge((float)jsonObject.optDouble("paddingEdge", 0.0)); recognizer.setRecognitionModeFilter(BlinkIDSerializationUtils.deserializeRecognitionModeFilter(jsonObject.optJSONObject("recognitionModeFilter"))); @@ -63,6 +66,7 @@ public JSONObject serializeResult(Recognizer recognizer) { jsonResult.put("documentAdditionalNumber", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentAdditionalNumber())); jsonResult.put("documentNumber", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentNumber())); jsonResult.put("documentOptionalAdditionalNumber", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentOptionalAdditionalNumber())); + jsonResult.put("documentSubtype", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentSubtype())); jsonResult.put("driverLicenseDetailedInfo", BlinkIDSerializationUtils.serializeDriverLicenseDetailedInfo(result.getDriverLicenseDetailedInfo())); jsonResult.put("employer", BlinkIDSerializationUtils.serializeStringResult(result.getEmployer())); jsonResult.put("expired", result.isExpired()); diff --git a/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/recognizers/serialization/BlinkIdSingleSideRecognizerSerialization.java b/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/recognizers/serialization/BlinkIdSingleSideRecognizerSerialization.java index 538b590..0b23210 100644 --- a/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/recognizers/serialization/BlinkIdSingleSideRecognizerSerialization.java +++ b/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/recognizers/serialization/BlinkIdSingleSideRecognizerSerialization.java @@ -13,13 +13,16 @@ public final class BlinkIdSingleSideRecognizerSerialization implements Recognize public Recognizer createRecognizer(JSONObject jsonObject) { com.microblink.blinkid.entities.recognizers.blinkid.generic.BlinkIdSingleSideRecognizer recognizer = new com.microblink.blinkid.entities.recognizers.blinkid.generic.BlinkIdSingleSideRecognizer(); recognizer.setAdditionalAnonymization(BlinkIDSerializationUtils.deserializeClassAnonymizationSettings(jsonObject.optJSONArray("additionalAnonymization"))); - recognizer.setAllowBlurFilter(jsonObject.optBoolean("allowBlurFilter", true)); recognizer.setAllowUnparsedMrzResults(jsonObject.optBoolean("allowUnparsedMrzResults", false)); recognizer.setAllowUnverifiedMrzResults(jsonObject.optBoolean("allowUnverifiedMrzResults", true)); recognizer.setAnonymizationMode(com.microblink.blinkid.entities.recognizers.blinkid.generic.AnonymizationMode.values()[jsonObject.optInt("anonymizationMode", 3)]); + recognizer.setBlurStrictnessLevel(com.microblink.blinkid.entities.recognizers.blinkid.generic.imageanalysis.StrictnessLevel.values()[jsonObject.optInt("blurStrictnessLevel", 1)]); + recognizer.setEnableBlurFilter(jsonObject.optBoolean("enableBlurFilter", true)); + recognizer.setEnableGlareFilter(jsonObject.optBoolean("enableGlareFilter", true)); recognizer.setFaceImageDpi(jsonObject.optInt("faceImageDpi", 250)); recognizer.setFullDocumentImageDpi(jsonObject.optInt("fullDocumentImageDpi", 250)); recognizer.setFullDocumentImageExtensionFactors(SerializationUtils.deserializeExtensionFactors(jsonObject.optJSONObject("fullDocumentImageExtensionFactors"))); + recognizer.setGlareStrictnessLevel(com.microblink.blinkid.entities.recognizers.blinkid.generic.imageanalysis.StrictnessLevel.values()[jsonObject.optInt("glareStrictnessLevel", 1)]); recognizer.setPaddingEdge((float)jsonObject.optDouble("paddingEdge", 0.0)); recognizer.setRecognitionModeFilter(BlinkIDSerializationUtils.deserializeRecognitionModeFilter(jsonObject.optJSONObject("recognitionModeFilter"))); recognizer.setReturnFaceImage(jsonObject.optBoolean("returnFaceImage", false)); @@ -56,6 +59,7 @@ public JSONObject serializeResult(Recognizer recognizer) { jsonResult.put("documentAdditionalNumber", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentAdditionalNumber())); jsonResult.put("documentNumber", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentNumber())); jsonResult.put("documentOptionalAdditionalNumber", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentOptionalAdditionalNumber())); + jsonResult.put("documentSubtype", BlinkIDSerializationUtils.serializeStringResult(result.getDocumentSubtype())); jsonResult.put("driverLicenseDetailedInfo", BlinkIDSerializationUtils.serializeDriverLicenseDetailedInfo(result.getDriverLicenseDetailedInfo())); jsonResult.put("employer", BlinkIDSerializationUtils.serializeStringResult(result.getEmployer())); jsonResult.put("expired", result.isExpired()); diff --git a/BlinkID/ios/Classes/MicroblinkModule/MBBlinkIDSerializationUtils.m b/BlinkID/ios/Classes/MicroblinkModule/MBBlinkIDSerializationUtils.m index ba23286..9a96626 100644 --- a/BlinkID/ios/Classes/MicroblinkModule/MBBlinkIDSerializationUtils.m +++ b/BlinkID/ios/Classes/MicroblinkModule/MBBlinkIDSerializationUtils.m @@ -208,7 +208,6 @@ +(NSDictionary *) serializeBarcodeResult:(MBBarcodeResult *)barcodeResult { +(NSDictionary *) serializeImageAnalysisResult:(MBImageAnalysisResult *)imageAnalysisResult { return @{ - @"blurred" : [NSNumber numberWithBool:imageAnalysisResult.blurred], @"documentImageColorStatus" : [NSNumber numberWithInteger:(imageAnalysisResult.documentImageColorStatus)], @"documentImageMoireStatus" : [NSNumber numberWithInteger:(imageAnalysisResult.documentImageMoireStatus)], @"faceDetectionStatus" : [NSNumber numberWithInteger:(imageAnalysisResult.faceDetectionStatus)], @@ -216,7 +215,10 @@ +(NSDictionary *) serializeImageAnalysisResult:(MBImageAnalysisResult *)imageAna @"barcodeDetectionStatus" : [NSNumber numberWithInteger:(imageAnalysisResult.barcodeDetectionStatus)], @"cardRotation" : [NSNumber numberWithInteger:(imageAnalysisResult.cardRotation)], @"cardOrientation" : [NSNumber numberWithInteger:(imageAnalysisResult.cardOrientation)], - @"realIdDetectionStatus" : [NSNumber numberWithInteger:(imageAnalysisResult.realIDDetectionStatus)] + @"realIdDetectionStatus" : [NSNumber numberWithInteger:(imageAnalysisResult.realIDDetectionStatus)], + @"blurDetected" : [NSNumber numberWithBool:imageAnalysisResult.blurDetected], + @"glareDetected" : [NSNumber numberWithBool:imageAnalysisResult.glareDetected], + }; } diff --git a/BlinkID/ios/Classes/MicroblinkModule/Overlays/Serialization/MBBlinkIdOverlaySettingsSerialization.m b/BlinkID/ios/Classes/MicroblinkModule/Overlays/Serialization/MBBlinkIdOverlaySettingsSerialization.m index ca88f99..2a364a5 100644 --- a/BlinkID/ios/Classes/MicroblinkModule/Overlays/Serialization/MBBlinkIdOverlaySettingsSerialization.m +++ b/BlinkID/ios/Classes/MicroblinkModule/Overlays/Serialization/MBBlinkIdOverlaySettingsSerialization.m @@ -213,6 +213,27 @@ -(MBOverlayViewController *) createOverlayViewController:(NSDictionary *)jsonOve sett.displayCancelButton = [showCancelButton boolValue]; } } + + { + id iOSCameraResolutionPreset = [jsonOverlaySettings valueForKey: @"iosCameraResolutionPreset"]; + if (iOSCameraResolutionPreset != nil) { + sett.cameraSettings.cameraPreset = [iOSCameraResolutionPreset integerValue]; + } + } + + { + id errorBlurDetected = [jsonOverlaySettings valueForKey:@"errorBlurDetected"]; + if (errorBlurDetected != nil) { + sett.blurDetectedMessage = (NSString *)errorBlurDetected; + } + } + + { + id errorGlareDetected = [jsonOverlaySettings valueForKey:@"errorGlareDetected"]; + if (errorGlareDetected != nil) { + sett.glareDetectedMessage = (NSString *)errorGlareDetected; + } + } return [[MBBlinkIdOverlayViewController alloc] initWithSettings:sett recognizerCollection:recognizerCollection delegate:self]; } diff --git a/BlinkID/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBBlinkIdMultiSideRecognizerWrapper.m b/BlinkID/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBBlinkIdMultiSideRecognizerWrapper.m index dfc1f96..ebfba0d 100644 --- a/BlinkID/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBBlinkIdMultiSideRecognizerWrapper.m +++ b/BlinkID/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBBlinkIdMultiSideRecognizerWrapper.m @@ -27,12 +27,6 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { } } } - { - id allowBlurFilter = [jsonRecognizer valueForKey:@"allowBlurFilter"]; - if (allowBlurFilter != nil) { - recognizer.allowBlurFilter = [(NSNumber *)allowBlurFilter boolValue]; - } - } { id allowUncertainFrontSideScan = [jsonRecognizer valueForKey:@"allowUncertainFrontSideScan"]; if (allowUncertainFrontSideScan != nil) { @@ -57,6 +51,24 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { recognizer.anonymizationMode = [(NSNumber *)anonymizationMode unsignedIntegerValue]; } } + { + id blurStrictnessLevel = [jsonRecognizer valueForKey:@"blurStrictnessLevel"]; + if (blurStrictnessLevel != nil) { + recognizer.blurStrictnessLevel = [(NSNumber *)blurStrictnessLevel unsignedIntegerValue]; + } + } + { + id enableBlurFilter = [jsonRecognizer valueForKey:@"enableBlurFilter"]; + if (enableBlurFilter != nil) { + recognizer.enableBlurFilter = [(NSNumber *)enableBlurFilter boolValue]; + } + } + { + id enableGlareFilter = [jsonRecognizer valueForKey:@"enableGlareFilter"]; + if (enableGlareFilter != nil) { + recognizer.enableGlareFilter = [(NSNumber *)enableGlareFilter boolValue]; + } + } { id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; if (faceImageDpi != nil) { @@ -75,6 +87,12 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { recognizer.fullDocumentImageExtensionFactors = [MBCommonSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; } } + { + id glareStrictnessLevel = [jsonRecognizer valueForKey:@"glareStrictnessLevel"]; + if (glareStrictnessLevel != nil) { + recognizer.glareStrictnessLevel = [(NSNumber *)glareStrictnessLevel unsignedIntegerValue]; + } + } { id maxAllowedMismatchesPerField = [jsonRecognizer valueForKey:@"maxAllowedMismatchesPerField"]; if (maxAllowedMismatchesPerField != nil) { @@ -177,6 +195,7 @@ -(NSDictionary *) serializeResult { [jsonResult setValue:[NSNumber numberWithInteger:(self.result.documentDataMatch)] forKey:@"documentDataMatch"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.documentNumber] forKey:@"documentNumber"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.documentOptionalAdditionalNumber] forKey:@"documentOptionalAdditionalNumber"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.documentSubtype] forKey:@"documentSubtype"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeDriverLicenseDetailedInfo:self.result.driverLicenseDetailedInfo] forKey:@"driverLicenseDetailedInfo"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.employer] forKey:@"employer"]; [jsonResult setValue:[NSNumber numberWithBool:self.result.expired] forKey:@"expired"]; diff --git a/BlinkID/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBBlinkIdSingleSideRecognizerWrapper.m b/BlinkID/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBBlinkIdSingleSideRecognizerWrapper.m index 617d001..3580693 100644 --- a/BlinkID/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBBlinkIdSingleSideRecognizerWrapper.m +++ b/BlinkID/ios/Classes/MicroblinkModule/Recognizers/Wrappers/MBBlinkIdSingleSideRecognizerWrapper.m @@ -27,12 +27,6 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { } } } - { - id allowBlurFilter = [jsonRecognizer valueForKey:@"allowBlurFilter"]; - if (allowBlurFilter != nil) { - recognizer.allowBlurFilter = [(NSNumber *)allowBlurFilter boolValue]; - } - } { id allowUnparsedMrzResults = [jsonRecognizer valueForKey:@"allowUnparsedMrzResults"]; if (allowUnparsedMrzResults != nil) { @@ -51,6 +45,24 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { recognizer.anonymizationMode = [(NSNumber *)anonymizationMode unsignedIntegerValue]; } } + { + id blurStrictnessLevel = [jsonRecognizer valueForKey:@"blurStrictnessLevel"]; + if (blurStrictnessLevel != nil) { + recognizer.blurStrictnessLevel = [(NSNumber *)blurStrictnessLevel unsignedIntegerValue]; + } + } + { + id enableBlurFilter = [jsonRecognizer valueForKey:@"enableBlurFilter"]; + if (enableBlurFilter != nil) { + recognizer.enableBlurFilter = [(NSNumber *)enableBlurFilter boolValue]; + } + } + { + id enableGlareFilter = [jsonRecognizer valueForKey:@"enableGlareFilter"]; + if (enableGlareFilter != nil) { + recognizer.enableGlareFilter = [(NSNumber *)enableGlareFilter boolValue]; + } + } { id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"]; if (faceImageDpi != nil) { @@ -69,6 +81,12 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer { recognizer.fullDocumentImageExtensionFactors = [MBCommonSerializationUtils deserializeMBImageExtensionFactors:(NSDictionary*)fullDocumentImageExtensionFactors]; } } + { + id glareStrictnessLevel = [jsonRecognizer valueForKey:@"glareStrictnessLevel"]; + if (glareStrictnessLevel != nil) { + recognizer.glareStrictnessLevel = [(NSNumber *)glareStrictnessLevel unsignedIntegerValue]; + } + } { id paddingEdge = [jsonRecognizer valueForKey:@"paddingEdge"]; if (paddingEdge != nil) { @@ -154,6 +172,7 @@ -(NSDictionary *) serializeResult { [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.documentAdditionalNumber] forKey:@"documentAdditionalNumber"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.documentNumber] forKey:@"documentNumber"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.documentOptionalAdditionalNumber] forKey:@"documentOptionalAdditionalNumber"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.documentSubtype] forKey:@"documentSubtype"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeDriverLicenseDetailedInfo:self.result.driverLicenseDetailedInfo] forKey:@"driverLicenseDetailedInfo"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.employer] forKey:@"employer"]; [jsonResult setValue:[NSNumber numberWithBool:self.result.expired] forKey:@"expired"]; diff --git a/BlinkID/lib/overlays/blinkid_overlays.dart b/BlinkID/lib/overlays/blinkid_overlays.dart index 35e1464..1d9c58a 100644 --- a/BlinkID/lib/overlays/blinkid_overlays.dart +++ b/BlinkID/lib/overlays/blinkid_overlays.dart @@ -1,4 +1,5 @@ import '../overlay_settings.dart'; +import '../types.dart'; import 'package:json_annotation/json_annotation.dart'; part 'blinkid_overlays.g.dart'; @@ -128,6 +129,29 @@ class BlinkIdOverlaySettings extends OverlaySettings { /// Default: true bool showCancelButton = true; + /// String: instructions for the user when blur has been detected on the document. + /// If null, default value will be used. + String? errorBlurDetected; + + /// String: instructions for the user when glare has been detected on the document. + /// If null, default value will be used. + String? errorGlareDetected; + + /// Defines possible Android device camera video resolution preset. + /// + /// Default: PresetDefault + AndroidCameraResolutionPreset androidCameraResolutionPreset = AndroidCameraResolutionPreset.PresetDefault; + + /// Defines possible iOS device camera video resolution preset. + /// + /// Default: PresetOptimal + iOSCameraResolutionPreset iosCameraResolutionPreset = iOSCameraResolutionPreset.PresetOptimal; + + /// Option to set whether legacy camera API should be used even on Lollipop devices that support newer Camera2 API. + /// WARNING: This setting should only be used if the new Camera2 API is not working on the device. This setting should not be applied on all devices. + /// Default: false + bool enableAndroidLegacyCameraApi = false; + BlinkIdOverlaySettings() : super('BlinkIdOverlaySettings'); factory BlinkIdOverlaySettings.fromJson(Map json) => diff --git a/BlinkID/lib/overlays/blinkid_overlays.g.dart b/BlinkID/lib/overlays/blinkid_overlays.g.dart index 8800374..fcbd46d 100644 --- a/BlinkID/lib/overlays/blinkid_overlays.g.dart +++ b/BlinkID/lib/overlays/blinkid_overlays.g.dart @@ -51,16 +51,25 @@ BlinkIdOverlaySettings _$BlinkIdOverlaySettingsFromJson( ..showOnboardingInfo = json['showOnboardingInfo'] as bool ..showIntroductionDialog = json['showIntroductionDialog'] as bool ..onboardingButtonTooltipDelay = - json['onboardingButtonTooltipDelay'] as int + (json['onboardingButtonTooltipDelay'] as num).toInt() ..backSideScanningTimeoutMilliseconds = - json['backSideScanningTimeoutMilliseconds'] as int + (json['backSideScanningTimeoutMilliseconds'] as num).toInt() ..scanBarcodeText = json['scanBarcodeText'] as String? ..errorDocumentTooCloseToEdge = json['errorDocumentTooCloseToEdge'] as String? ..language = json['language'] as String? ..country = json['country'] as String? ..showTorchButton = json['showTorchButton'] as bool - ..showCancelButton = json['showCancelButton'] as bool; + ..showCancelButton = json['showCancelButton'] as bool + ..errorBlurDetected = json['errorBlurDetected'] as String? + ..errorGlareDetected = json['errorGlareDetected'] as String? + ..androidCameraResolutionPreset = $enumDecode( + _$AndroidCameraResolutionPresetEnumMap, + json['androidCameraResolutionPreset']) + ..iosCameraResolutionPreset = $enumDecode( + _$iOSCameraResolutionPresetEnumMap, json['iosCameraResolutionPreset']) + ..enableAndroidLegacyCameraApi = + json['enableAndroidLegacyCameraApi'] as bool; Map _$BlinkIdOverlaySettingsToJson( BlinkIdOverlaySettings instance) => @@ -94,8 +103,34 @@ Map _$BlinkIdOverlaySettingsToJson( 'country': instance.country, 'showTorchButton': instance.showTorchButton, 'showCancelButton': instance.showCancelButton, + 'errorBlurDetected': instance.errorBlurDetected, + 'errorGlareDetected': instance.errorGlareDetected, + 'androidCameraResolutionPreset': _$AndroidCameraResolutionPresetEnumMap[ + instance.androidCameraResolutionPreset]!, + 'iosCameraResolutionPreset': _$iOSCameraResolutionPresetEnumMap[ + instance.iosCameraResolutionPreset]!, + 'enableAndroidLegacyCameraApi': instance.enableAndroidLegacyCameraApi, }; +const _$AndroidCameraResolutionPresetEnumMap = { + AndroidCameraResolutionPreset.PresetDefault: 0, + AndroidCameraResolutionPreset.Preset480p: 1, + AndroidCameraResolutionPreset.Preset720p: 2, + AndroidCameraResolutionPreset.Preset1080p: 3, + AndroidCameraResolutionPreset.Preset2160p: 4, + AndroidCameraResolutionPreset.PresetMaxAvailable: 5, +}; + +const _$iOSCameraResolutionPresetEnumMap = { + iOSCameraResolutionPreset.Preset480p: 0, + iOSCameraResolutionPreset.Preset720p: 1, + iOSCameraResolutionPreset.Preset1080p: 2, + iOSCameraResolutionPreset.Preset4K: 3, + iOSCameraResolutionPreset.PresetOptimal: 4, + iOSCameraResolutionPreset.PresetMax: 5, + iOSCameraResolutionPreset.PresetPhoto: 6, +}; + DocumentVerificationOverlaySettings _$DocumentVerificationOverlaySettingsFromJson(Map json) => DocumentVerificationOverlaySettings() diff --git a/BlinkID/lib/recognizer.g.dart b/BlinkID/lib/recognizer.g.dart index caab07f..c751f19 100644 --- a/BlinkID/lib/recognizer.g.dart +++ b/BlinkID/lib/recognizer.g.dart @@ -40,7 +40,8 @@ RecognizerCollection _$RecognizerCollectionFromJson( .toList(), ) ..allowMultipleResults = json['allowMultipleResults'] as bool - ..milisecondsBeforeTimeout = json['milisecondsBeforeTimeout'] as int; + ..milisecondsBeforeTimeout = + (json['milisecondsBeforeTimeout'] as num).toInt(); Map _$RecognizerCollectionToJson( RecognizerCollection instance) => diff --git a/BlinkID/lib/recognizers/blink_id_multi_side_recognizer.dart b/BlinkID/lib/recognizers/blink_id_multi_side_recognizer.dart index 5c49a7c..8710834 100644 --- a/BlinkID/lib/recognizers/blink_id_multi_side_recognizer.dart +++ b/BlinkID/lib/recognizers/blink_id_multi_side_recognizer.dart @@ -81,6 +81,9 @@ class BlinkIdMultiSideRecognizerResult extends RecognizerResult { ///The one more additional number of the document. StringResult? documentOptionalAdditionalNumber; + ///The transcription of the document subtype. + StringResult? documentSubtype; + ///The driver license detailed info. DriverLicenseDetailedInfo? driverLicenseDetailedInfo; @@ -241,6 +244,8 @@ class BlinkIdMultiSideRecognizerResult extends RecognizerResult { this.documentOptionalAdditionalNumber = nativeResult["documentOptionalAdditionalNumber"] != null ? StringResult(Map.from(nativeResult["documentOptionalAdditionalNumber"])) : null; + this.documentSubtype = nativeResult["documentSubtype"] != null ? StringResult(Map.from(nativeResult["documentSubtype"])) : null; + this.driverLicenseDetailedInfo = nativeResult["driverLicenseDetailedInfo"] != null ? DriverLicenseDetailedInfo(Map.from(nativeResult["driverLicenseDetailedInfo"])) : null; this.employer = nativeResult["employer"] != null ? StringResult(Map.from(nativeResult["employer"])) : null; @@ -323,12 +328,6 @@ class BlinkIdMultiSideRecognizer extends Recognizer { List additionalAnonymization = []; - ///Defines whether blured frames filtering is allowed - /// - /// - - bool allowBlurFilter = true; - ///Proceed with scanning the back side even if the front side result is uncertain. /// This only works for still images - video feeds will ignore this setting. /// @@ -356,6 +355,24 @@ class BlinkIdMultiSideRecognizer extends Recognizer { AnonymizationMode anonymizationMode = AnonymizationMode.FullResult; + ///Strictness level for blur detection. + /// + /// + + StrictnessLevel blurStrictnessLevel = StrictnessLevel.Normal; + + ///Skip processing of the blurred frames. + /// + /// + + bool enableBlurFilter = true; + + ///Skip processing of the glared frames. + /// + /// + + bool enableGlareFilter = true; + ///Property for setting DPI for face images /// Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception /// @@ -377,6 +394,12 @@ class BlinkIdMultiSideRecognizer extends Recognizer { ImageExtensionFactors fullDocumentImageExtensionFactors = ImageExtensionFactors(); + ///Strictness level for glare detection. + /// + /// + + StrictnessLevel glareStrictnessLevel = StrictnessLevel.Normal; + ///Configure the number of characters per field that are allowed to be inconsistent in data match. /// /// diff --git a/BlinkID/lib/recognizers/blink_id_multi_side_recognizer.g.dart b/BlinkID/lib/recognizers/blink_id_multi_side_recognizer.g.dart index 2312d03..e7a5209 100644 --- a/BlinkID/lib/recognizers/blink_id_multi_side_recognizer.g.dart +++ b/BlinkID/lib/recognizers/blink_id_multi_side_recognizer.g.dart @@ -15,19 +15,24 @@ BlinkIdMultiSideRecognizer _$BlinkIdMultiSideRecognizerFromJson( .map((e) => ClassAnonymizationSettings.fromJson(e as Map)) .toList() - ..allowBlurFilter = json['allowBlurFilter'] as bool ..allowUncertainFrontSideScan = json['allowUncertainFrontSideScan'] as bool ..allowUnparsedMrzResults = json['allowUnparsedMrzResults'] as bool ..allowUnverifiedMrzResults = json['allowUnverifiedMrzResults'] as bool ..anonymizationMode = $enumDecode(_$AnonymizationModeEnumMap, json['anonymizationMode']) - ..faceImageDpi = json['faceImageDpi'] as int - ..fullDocumentImageDpi = json['fullDocumentImageDpi'] as int + ..blurStrictnessLevel = + $enumDecode(_$StrictnessLevelEnumMap, json['blurStrictnessLevel']) + ..enableBlurFilter = json['enableBlurFilter'] as bool + ..enableGlareFilter = json['enableGlareFilter'] as bool + ..faceImageDpi = (json['faceImageDpi'] as num).toInt() + ..fullDocumentImageDpi = (json['fullDocumentImageDpi'] as num).toInt() ..fullDocumentImageExtensionFactors = ImageExtensionFactors.fromJson( json['fullDocumentImageExtensionFactors'] as Map) + ..glareStrictnessLevel = + $enumDecode(_$StrictnessLevelEnumMap, json['glareStrictnessLevel']) ..maxAllowedMismatchesPerField = - json['maxAllowedMismatchesPerField'] as int + (json['maxAllowedMismatchesPerField'] as num).toInt() ..paddingEdge = (json['paddingEdge'] as num).toDouble() ..recognitionModeFilter = RecognitionModeFilter.fromJson( json['recognitionModeFilter'] as Map) @@ -36,7 +41,7 @@ BlinkIdMultiSideRecognizer _$BlinkIdMultiSideRecognizerFromJson( ..returnSignatureImage = json['returnSignatureImage'] as bool ..saveCameraFrames = json['saveCameraFrames'] as bool ..scanCroppedDocumentImage = json['scanCroppedDocumentImage'] as bool - ..signatureImageDpi = json['signatureImageDpi'] as int + ..signatureImageDpi = (json['signatureImageDpi'] as num).toInt() ..skipUnsupportedBack = json['skipUnsupportedBack'] as bool ..validateResultCharacters = json['validateResultCharacters'] as bool; @@ -45,16 +50,21 @@ Map _$BlinkIdMultiSideRecognizerToJson( { 'recognizerType': instance.recognizerType, 'additionalAnonymization': instance.additionalAnonymization, - 'allowBlurFilter': instance.allowBlurFilter, 'allowUncertainFrontSideScan': instance.allowUncertainFrontSideScan, 'allowUnparsedMrzResults': instance.allowUnparsedMrzResults, 'allowUnverifiedMrzResults': instance.allowUnverifiedMrzResults, 'anonymizationMode': _$AnonymizationModeEnumMap[instance.anonymizationMode]!, + 'blurStrictnessLevel': + _$StrictnessLevelEnumMap[instance.blurStrictnessLevel]!, + 'enableBlurFilter': instance.enableBlurFilter, + 'enableGlareFilter': instance.enableGlareFilter, 'faceImageDpi': instance.faceImageDpi, 'fullDocumentImageDpi': instance.fullDocumentImageDpi, 'fullDocumentImageExtensionFactors': instance.fullDocumentImageExtensionFactors, + 'glareStrictnessLevel': + _$StrictnessLevelEnumMap[instance.glareStrictnessLevel]!, 'maxAllowedMismatchesPerField': instance.maxAllowedMismatchesPerField, 'paddingEdge': instance.paddingEdge, 'recognitionModeFilter': instance.recognitionModeFilter, @@ -74,3 +84,9 @@ const _$AnonymizationModeEnumMap = { AnonymizationMode.ResultFieldsOnly: 2, AnonymizationMode.FullResult: 3, }; + +const _$StrictnessLevelEnumMap = { + StrictnessLevel.Strict: 0, + StrictnessLevel.Normal: 1, + StrictnessLevel.Relaxed: 2, +}; diff --git a/BlinkID/lib/recognizers/blink_id_single_side_recognizer.dart b/BlinkID/lib/recognizers/blink_id_single_side_recognizer.dart index 9cf38f0..56018cc 100644 --- a/BlinkID/lib/recognizers/blink_id_single_side_recognizer.dart +++ b/BlinkID/lib/recognizers/blink_id_single_side_recognizer.dart @@ -63,6 +63,9 @@ class BlinkIdSingleSideRecognizerResult extends RecognizerResult { ///The one more additional number of the document. StringResult? documentOptionalAdditionalNumber; + ///The transcription of the document subtype. + StringResult? documentSubtype; + ///The driver license detailed info. DriverLicenseDetailedInfo? driverLicenseDetailedInfo; @@ -197,6 +200,8 @@ class BlinkIdSingleSideRecognizerResult extends RecognizerResult { this.documentOptionalAdditionalNumber = nativeResult["documentOptionalAdditionalNumber"] != null ? StringResult(Map.from(nativeResult["documentOptionalAdditionalNumber"])) : null; + this.documentSubtype = nativeResult["documentSubtype"] != null ? StringResult(Map.from(nativeResult["documentSubtype"])) : null; + this.driverLicenseDetailedInfo = nativeResult["driverLicenseDetailedInfo"] != null ? DriverLicenseDetailedInfo(Map.from(nativeResult["driverLicenseDetailedInfo"])) : null; this.employer = nativeResult["employer"] != null ? StringResult(Map.from(nativeResult["employer"])) : null; @@ -269,12 +274,6 @@ class BlinkIdSingleSideRecognizer extends Recognizer { List additionalAnonymization = []; - ///Defines whether blured frames filtering is allowed - /// - /// - - bool allowBlurFilter = true; - ///Defines whether returning of unparsed MRZ (Machine Readable Zone) results is allowed /// /// @@ -295,6 +294,24 @@ class BlinkIdSingleSideRecognizer extends Recognizer { AnonymizationMode anonymizationMode = AnonymizationMode.FullResult; + ///Strictness level for blur detection. + /// + /// + + StrictnessLevel blurStrictnessLevel = StrictnessLevel.Normal; + + ///Skip processing of the blurred frames. + /// + /// + + bool enableBlurFilter = true; + + ///Skip processing of the glared frames. + /// + /// + + bool enableGlareFilter = true; + ///Property for setting DPI for face images /// Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception /// @@ -316,6 +333,12 @@ class BlinkIdSingleSideRecognizer extends Recognizer { ImageExtensionFactors fullDocumentImageExtensionFactors = ImageExtensionFactors(); + ///Strictness level for glare detection. + /// + /// + + StrictnessLevel glareStrictnessLevel = StrictnessLevel.Normal; + ///Pading is a minimum distance from the edge of the frame and is defined as a percentage of the frame width. Default value is 0.0f and in that case /// padding edge and image edge are the same. /// Recommended value is 0.02f. diff --git a/BlinkID/lib/recognizers/blink_id_single_side_recognizer.g.dart b/BlinkID/lib/recognizers/blink_id_single_side_recognizer.g.dart index 3869d17..fbd75a4 100644 --- a/BlinkID/lib/recognizers/blink_id_single_side_recognizer.g.dart +++ b/BlinkID/lib/recognizers/blink_id_single_side_recognizer.g.dart @@ -15,15 +15,20 @@ BlinkIdSingleSideRecognizer _$BlinkIdSingleSideRecognizerFromJson( .map((e) => ClassAnonymizationSettings.fromJson(e as Map)) .toList() - ..allowBlurFilter = json['allowBlurFilter'] as bool ..allowUnparsedMrzResults = json['allowUnparsedMrzResults'] as bool ..allowUnverifiedMrzResults = json['allowUnverifiedMrzResults'] as bool ..anonymizationMode = $enumDecode(_$AnonymizationModeEnumMap, json['anonymizationMode']) - ..faceImageDpi = json['faceImageDpi'] as int - ..fullDocumentImageDpi = json['fullDocumentImageDpi'] as int + ..blurStrictnessLevel = + $enumDecode(_$StrictnessLevelEnumMap, json['blurStrictnessLevel']) + ..enableBlurFilter = json['enableBlurFilter'] as bool + ..enableGlareFilter = json['enableGlareFilter'] as bool + ..faceImageDpi = (json['faceImageDpi'] as num).toInt() + ..fullDocumentImageDpi = (json['fullDocumentImageDpi'] as num).toInt() ..fullDocumentImageExtensionFactors = ImageExtensionFactors.fromJson( json['fullDocumentImageExtensionFactors'] as Map) + ..glareStrictnessLevel = + $enumDecode(_$StrictnessLevelEnumMap, json['glareStrictnessLevel']) ..paddingEdge = (json['paddingEdge'] as num).toDouble() ..recognitionModeFilter = RecognitionModeFilter.fromJson( json['recognitionModeFilter'] as Map) @@ -32,7 +37,7 @@ BlinkIdSingleSideRecognizer _$BlinkIdSingleSideRecognizerFromJson( ..returnSignatureImage = json['returnSignatureImage'] as bool ..saveCameraFrames = json['saveCameraFrames'] as bool ..scanCroppedDocumentImage = json['scanCroppedDocumentImage'] as bool - ..signatureImageDpi = json['signatureImageDpi'] as int + ..signatureImageDpi = (json['signatureImageDpi'] as num).toInt() ..validateResultCharacters = json['validateResultCharacters'] as bool; Map _$BlinkIdSingleSideRecognizerToJson( @@ -40,15 +45,20 @@ Map _$BlinkIdSingleSideRecognizerToJson( { 'recognizerType': instance.recognizerType, 'additionalAnonymization': instance.additionalAnonymization, - 'allowBlurFilter': instance.allowBlurFilter, 'allowUnparsedMrzResults': instance.allowUnparsedMrzResults, 'allowUnverifiedMrzResults': instance.allowUnverifiedMrzResults, 'anonymizationMode': _$AnonymizationModeEnumMap[instance.anonymizationMode]!, + 'blurStrictnessLevel': + _$StrictnessLevelEnumMap[instance.blurStrictnessLevel]!, + 'enableBlurFilter': instance.enableBlurFilter, + 'enableGlareFilter': instance.enableGlareFilter, 'faceImageDpi': instance.faceImageDpi, 'fullDocumentImageDpi': instance.fullDocumentImageDpi, 'fullDocumentImageExtensionFactors': instance.fullDocumentImageExtensionFactors, + 'glareStrictnessLevel': + _$StrictnessLevelEnumMap[instance.glareStrictnessLevel]!, 'paddingEdge': instance.paddingEdge, 'recognitionModeFilter': instance.recognitionModeFilter, 'returnFaceImage': instance.returnFaceImage, @@ -66,3 +76,9 @@ const _$AnonymizationModeEnumMap = { AnonymizationMode.ResultFieldsOnly: 2, AnonymizationMode.FullResult: 3, }; + +const _$StrictnessLevelEnumMap = { + StrictnessLevel.Strict: 0, + StrictnessLevel.Normal: 1, + StrictnessLevel.Relaxed: 2, +}; diff --git a/BlinkID/lib/recognizers/document_face_recognizer.g.dart b/BlinkID/lib/recognizers/document_face_recognizer.g.dart index fb07b58..bda2725 100644 --- a/BlinkID/lib/recognizers/document_face_recognizer.g.dart +++ b/BlinkID/lib/recognizers/document_face_recognizer.g.dart @@ -12,12 +12,12 @@ DocumentFaceRecognizer _$DocumentFaceRecognizerFromJson( ..recognizerType = json['recognizerType'] as String ..detectorType = $enumDecode(_$DocumentFaceDetectorTypeEnumMap, json['detectorType']) - ..faceImageDpi = json['faceImageDpi'] as int - ..fullDocumentImageDpi = json['fullDocumentImageDpi'] as int + ..faceImageDpi = (json['faceImageDpi'] as num).toInt() + ..fullDocumentImageDpi = (json['fullDocumentImageDpi'] as num).toInt() ..fullDocumentImageExtensionFactors = ImageExtensionFactors.fromJson( json['fullDocumentImageExtensionFactors'] as Map) ..numStableDetectionsThreshold = - json['numStableDetectionsThreshold'] as int + (json['numStableDetectionsThreshold'] as num).toInt() ..returnFaceImage = json['returnFaceImage'] as bool ..returnFullDocumentImage = json['returnFullDocumentImage'] as bool; diff --git a/BlinkID/lib/recognizers/mrtd_combined_recognizer.g.dart b/BlinkID/lib/recognizers/mrtd_combined_recognizer.g.dart index 5579c61..4fe8ef9 100644 --- a/BlinkID/lib/recognizers/mrtd_combined_recognizer.g.dart +++ b/BlinkID/lib/recognizers/mrtd_combined_recognizer.g.dart @@ -15,12 +15,12 @@ MrtdCombinedRecognizer _$MrtdCombinedRecognizerFromJson( ..allowUnverifiedResults = json['allowUnverifiedResults'] as bool ..detectorType = $enumDecode(_$DocumentFaceDetectorTypeEnumMap, json['detectorType']) - ..faceImageDpi = json['faceImageDpi'] as int - ..fullDocumentImageDpi = json['fullDocumentImageDpi'] as int + ..faceImageDpi = (json['faceImageDpi'] as num).toInt() + ..fullDocumentImageDpi = (json['fullDocumentImageDpi'] as num).toInt() ..fullDocumentImageExtensionFactors = ImageExtensionFactors.fromJson( json['fullDocumentImageExtensionFactors'] as Map) ..numStableDetectionsThreshold = - json['numStableDetectionsThreshold'] as int + (json['numStableDetectionsThreshold'] as num).toInt() ..returnFaceImage = json['returnFaceImage'] as bool ..returnFullDocumentImage = json['returnFullDocumentImage'] as bool; diff --git a/BlinkID/lib/recognizers/mrtd_recognizer.g.dart b/BlinkID/lib/recognizers/mrtd_recognizer.g.dart index 6865e07..1ef816e 100644 --- a/BlinkID/lib/recognizers/mrtd_recognizer.g.dart +++ b/BlinkID/lib/recognizers/mrtd_recognizer.g.dart @@ -13,7 +13,7 @@ MrtdRecognizer _$MrtdRecognizerFromJson(Map json) => ..allowUnparsedResults = json['allowUnparsedResults'] as bool ..allowUnverifiedResults = json['allowUnverifiedResults'] as bool ..detectGlare = json['detectGlare'] as bool - ..fullDocumentImageDpi = json['fullDocumentImageDpi'] as int + ..fullDocumentImageDpi = (json['fullDocumentImageDpi'] as num).toInt() ..fullDocumentImageExtensionFactors = ImageExtensionFactors.fromJson( json['fullDocumentImageExtensionFactors'] as Map) ..returnFullDocumentImage = json['returnFullDocumentImage'] as bool; diff --git a/BlinkID/lib/recognizers/passport_recognizer.g.dart b/BlinkID/lib/recognizers/passport_recognizer.g.dart index 0c805cd..6569cdc 100644 --- a/BlinkID/lib/recognizers/passport_recognizer.g.dart +++ b/BlinkID/lib/recognizers/passport_recognizer.g.dart @@ -11,8 +11,8 @@ PassportRecognizer _$PassportRecognizerFromJson(Map json) => ..recognizerType = json['recognizerType'] as String ..anonymizeNetherlandsMrz = json['anonymizeNetherlandsMrz'] as bool ..detectGlare = json['detectGlare'] as bool - ..faceImageDpi = json['faceImageDpi'] as int - ..fullDocumentImageDpi = json['fullDocumentImageDpi'] as int + ..faceImageDpi = (json['faceImageDpi'] as num).toInt() + ..fullDocumentImageDpi = (json['fullDocumentImageDpi'] as num).toInt() ..fullDocumentImageExtensionFactors = ImageExtensionFactors.fromJson( json['fullDocumentImageExtensionFactors'] as Map) ..returnFaceImage = json['returnFaceImage'] as bool diff --git a/BlinkID/lib/recognizers/usdl_combined_recognizer.g.dart b/BlinkID/lib/recognizers/usdl_combined_recognizer.g.dart index 4342b04..785c17e 100644 --- a/BlinkID/lib/recognizers/usdl_combined_recognizer.g.dart +++ b/BlinkID/lib/recognizers/usdl_combined_recognizer.g.dart @@ -10,14 +10,14 @@ UsdlCombinedRecognizer _$UsdlCombinedRecognizerFromJson( Map json) => UsdlCombinedRecognizer() ..recognizerType = json['recognizerType'] as String - ..faceImageDpi = json['faceImageDpi'] as int - ..fullDocumentImageDpi = json['fullDocumentImageDpi'] as int + ..faceImageDpi = (json['faceImageDpi'] as num).toInt() + ..fullDocumentImageDpi = (json['fullDocumentImageDpi'] as num).toInt() ..returnFaceImage = json['returnFaceImage'] as bool ..returnFullDocumentImage = json['returnFullDocumentImage'] as bool ..fullDocumentImageExtensionFactors = ImageExtensionFactors.fromJson( json['fullDocumentImageExtensionFactors'] as Map) ..numStableDetectionsThreshold = - json['numStableDetectionsThreshold'] as int; + (json['numStableDetectionsThreshold'] as num).toInt(); Map _$UsdlCombinedRecognizerToJson( UsdlCombinedRecognizer instance) => diff --git a/BlinkID/lib/recognizers/visa_recognizer.g.dart b/BlinkID/lib/recognizers/visa_recognizer.g.dart index b6b5a6c..170a072 100644 --- a/BlinkID/lib/recognizers/visa_recognizer.g.dart +++ b/BlinkID/lib/recognizers/visa_recognizer.g.dart @@ -10,8 +10,8 @@ VisaRecognizer _$VisaRecognizerFromJson(Map json) => VisaRecognizer() ..recognizerType = json['recognizerType'] as String ..detectGlare = json['detectGlare'] as bool - ..faceImageDpi = json['faceImageDpi'] as int - ..fullDocumentImageDpi = json['fullDocumentImageDpi'] as int + ..faceImageDpi = (json['faceImageDpi'] as num).toInt() + ..fullDocumentImageDpi = (json['fullDocumentImageDpi'] as num).toInt() ..fullDocumentImageExtensionFactors = ImageExtensionFactors.fromJson( json['fullDocumentImageExtensionFactors'] as Map) ..returnFaceImage = json['returnFaceImage'] as bool diff --git a/BlinkID/lib/types.dart b/BlinkID/lib/types.dart index 0ded79d..ec4c264 100644 --- a/BlinkID/lib/types.dart +++ b/BlinkID/lib/types.dart @@ -1383,6 +1383,16 @@ enum CardOrientation { NotAvailable } +/// Defines possible strictness levels for blur are glare detection. +enum StrictnessLevel { + /// The most strict level for blur are glare detection. + @JsonValue(0) Strict, + /// The default strictness level for blur are glare detection. + @JsonValue(1) Normal, + /// The least strict level for blur are glare detection. + @JsonValue(2) Relaxed +} + /// Defines possible the document country from ClassInfo scanned with BlinkID or BlinkID MultiSide Recognizer enum Country { @JsonValue(0) None, @@ -2161,9 +2171,6 @@ enum DocumentSide { /// Defines possible color and moire statuses determined from scanned image. class ImageAnalysisResult { - - /// Whether the image is blurred. - bool? blurred; /// The color status determined from scanned image. DocumentImageColorStatus? documentImageColorStatus; /// The Moire pattern detection status determined from the scanned image. @@ -2180,9 +2187,12 @@ class ImageAnalysisResult { CardOrientation? cardOrientation; /// RealID detection status determined from the scanned image. ImageAnalysisDetectionStatus? realIdDetectionStatus; + /// Indicates if blur was detected on the scanned image. + bool? blurDetected; + /// Indicates if glare was detected on the scanned image. + bool? glareDetected; ImageAnalysisResult(Map nativeImageAnalysisResult) { - this.blurred = nativeImageAnalysisResult['blurred']; this.documentImageColorStatus = DocumentImageColorStatus.values[nativeImageAnalysisResult['documentImageColorStatus']]; this.documentImageMoireStatus = ImageAnalysisDetectionStatus.values[nativeImageAnalysisResult['documentImageMoireStatus']]; this.faceDetectionStatus = ImageAnalysisDetectionStatus.values[nativeImageAnalysisResult['faceDetectionStatus']]; @@ -2191,6 +2201,8 @@ class ImageAnalysisResult { this.cardRotation = CardRotation.values[nativeImageAnalysisResult['cardRotation']]; this.cardOrientation = CardOrientation.values[nativeImageAnalysisResult['cardOrientation']]; this.realIdDetectionStatus = ImageAnalysisDetectionStatus.values[nativeImageAnalysisResult['realIdDetectionStatus']]; + this.blurDetected = nativeImageAnalysisResult['blurDetected']; + this.glareDetected = nativeImageAnalysisResult['glareDetected']; } } @@ -2425,4 +2437,38 @@ enum DataMatchState { Failed, /// Data match. Success +} + +/// Defines possible Android device camera video resolution preset +enum AndroidCameraResolutionPreset { + /// Will choose camera video resolution which is best for current device. + @JsonValue(0) PresetDefault, + /// Attempts to choose camera video resolution as closely as 480p. + @JsonValue(1) Preset480p, + /// Attempts to choose camera video resolution as closely as 720p. + @JsonValue(2) Preset720p, + /// Attempts to choose camera video resolution as closely as 1080p. + @JsonValue(3) Preset1080p, + /// Attempts to choose camera video resolution as closely as 2160p. + @JsonValue(4) Preset2160p, + /// Will choose max available camera video resolution. + @JsonValue(5) PresetMaxAvailable +} + +/// Define possible iOS device camera video resolution preset +enum iOSCameraResolutionPreset { + /// 480p video will always be used. + @JsonValue(0) Preset480p, + /// 720p video will always be used. + @JsonValue(1) Preset720p, + /// 1080p video will always be used. + @JsonValue(2) Preset1080p, + /// 4K video will always be used. + @JsonValue(3) Preset4K, + /// The library will calculate optimal resolution based on the use case and device used. + @JsonValue(4) PresetOptimal, + /// Device's maximal video resolution will be used. + @JsonValue(5) PresetMax, + /// Device's photo preview resolution will be used. + @JsonValue(6) PresetPhoto } \ No newline at end of file diff --git a/BlinkID/lib/types.g.dart b/BlinkID/lib/types.g.dart index 81c755e..2809bf4 100644 --- a/BlinkID/lib/types.g.dart +++ b/BlinkID/lib/types.g.dart @@ -569,8 +569,9 @@ const _$FieldTypeEnumMap = { DocumentNumberAnonymizationSettings _$DocumentNumberAnonymizationSettingsFromJson(Map json) => DocumentNumberAnonymizationSettings() - ..prefixDigitsVisible = json['prefixDigitsVisible'] as int? - ..suffixDigitsVisible = json['suffixDigitsVisible'] as int?; + ..prefixDigitsVisible = (json['prefixDigitsVisible'] as num?)?.toInt() + ..suffixDigitsVisible = + (json['suffixDigitsVisible'] as num?)?.toInt(); Map _$DocumentNumberAnonymizationSettingsToJson( DocumentNumberAnonymizationSettings instance) => From c2f7162f623dfc0b3c93b5a4edbfa23fa2b713fb Mon Sep 17 00:00:00 2001 From: mparadina Date: Mon, 15 Jul 2024 12:56:48 +0200 Subject: [PATCH 2/3] SDK version update --- BlinkID/android/build.gradle | 2 +- BlinkID/android/src/main/AndroidManifest.xml | 5 ++--- .../serialization/BlinkIdOverlaySettingsSerialization.java | 1 + BlinkID/ios/blinkid_flutter.podspec | 4 ++-- BlinkID/pubspec.yaml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/BlinkID/android/build.gradle b/BlinkID/android/build.gradle index 9ad514e..cb2c859 100644 --- a/BlinkID/android/build.gradle +++ b/BlinkID/android/build.gradle @@ -38,7 +38,7 @@ android { } dependencies { - implementation('com.microblink:blinkid:6.7.0@aar') { + implementation('com.microblink:blinkid:6.8.0@aar') { transitive = true } } diff --git a/BlinkID/android/src/main/AndroidManifest.xml b/BlinkID/android/src/main/AndroidManifest.xml index 6a42c4d..760de62 100644 --- a/BlinkID/android/src/main/AndroidManifest.xml +++ b/BlinkID/android/src/main/AndroidManifest.xml @@ -1,8 +1,7 @@ - + - + diff --git a/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/overlays/serialization/BlinkIdOverlaySettingsSerialization.java b/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/overlays/serialization/BlinkIdOverlaySettingsSerialization.java index 7162b1d..10117da 100644 --- a/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/overlays/serialization/BlinkIdOverlaySettingsSerialization.java +++ b/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/overlays/serialization/BlinkIdOverlaySettingsSerialization.java @@ -22,6 +22,7 @@ public UISettings createUISettings(Context context, JSONObject jsonUISettings, R BlinkIdUISettings settings = new BlinkIdUISettings(recognizerBundle); OverlaySerializationUtils.extractCommonUISettings(jsonUISettings, settings); + settings.setAllowHapticFeedback(false); boolean requireDocumentSidesDataMatch = jsonUISettings.optBoolean("requireDocumentSidesDataMatch", true); settings.setDocumentDataMatchRequired(requireDocumentSidesDataMatch); diff --git a/BlinkID/ios/blinkid_flutter.podspec b/BlinkID/ios/blinkid_flutter.podspec index ab303d7..a927ee1 100644 --- a/BlinkID/ios/blinkid_flutter.podspec +++ b/BlinkID/ios/blinkid_flutter.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'blinkid_flutter' - s.version = '6.7.0' + s.version = '6.8.0' s.summary = 'A new flutter plugin project.' s.description = <<-DESC A new flutter plugin project. @@ -18,7 +18,7 @@ A new flutter plugin project. s.dependency 'Flutter' s.platform = :ios, '13.0' - s.dependency 'PPBlinkID', '~> 6.7.1' + s.dependency 'PPBlinkID', '~> 6.8.0' # Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported. s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' } diff --git a/BlinkID/pubspec.yaml b/BlinkID/pubspec.yaml index b758bea..ab4cb77 100644 --- a/BlinkID/pubspec.yaml +++ b/BlinkID/pubspec.yaml @@ -1,6 +1,6 @@ name: blinkid_flutter description: Flutter plugin for BlinkID, SDK for scanning and OCR of various identity documents. -version: 6.7.0 +version: 6.8.0 homepage: https://microblink.com environment: From 423e92e25fd115ae24ffee962ddf23ea6592fad6 Mon Sep 17 00:00:00 2001 From: mparadina Date: Mon, 15 Jul 2024 13:58:17 +0200 Subject: [PATCH 3/3] update license keys and Release Notes.md --- Release notes.md | 27 +++++++++++++++++++++++++++ sample_files/main.dart | 12 ++++++------ 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/Release notes.md b/Release notes.md index ad8c51d..db61462 100644 --- a/Release notes.md +++ b/Release notes.md @@ -1,3 +1,30 @@ +## 6.8.0 + +- We have updated the plugin to [Android SDK v6.8.0](https://github.com/BlinkID/blinkid-android/releases/tag/v6.8.0) and [iOS SDK v6.8.0](https://github.com/BlinkID/blinkid-ios/releases/tag/v6.8.0) + +**Glare and blur detection** + +- We’ve introduced glare detection to BlinkID, which removes occlusion on document images caused by glare. +- We’ve raised the threshold for our blur model, making it stricter. This improvement ensures that sharper images are accepted for processing. + - To disable the glare and blur filters, modify the `enableBlurFilter` and `enableGlareFilter` properties on the BlinkID recognizers (filters are enabled by default). + - The strictness level can be modified to `Strict`, `Normal` and `Relaxed` on the `glareStrictnessLevel` and `blurStrictnessLevel` properties with `StrictnessLevel`. + - To check if glare and blur are present on the document after the scanning process has finished, see `glareDetected` and `blurDetected` properties in `ImageAnalysisResult`. + +**UI Settings** + +- Real-time feedback during scanning includes a new UI message to help users position the document correctly and reduce glare and blur. + - Check `errorGlareDetected` and `errorBlurDetected` in the `BlinkIdOverlaySettings`. +- We have added camera presets to each platform + - Modify `AndroidCameraResolutionPreset` and `iOSCameraResolutionPreset` in `BlinkIdOverlaySettings` to change different to camera resolutions if necessary. +- Camera Legacy API - Android-specific + - We have added `enableAndroidLegacyCameraApi` property. This setting should only be used if the new Camera2 API is not working on the device, and it should not be applied to all devices. + +**Bug fixes** + +- Android-specific + - We have removed the package attribute from AndroidManifest.xml + - We have temporarily disabled haptic feedback for Android devices due to an issue with Android 5.1. + ## 6.7.0 - We have updated the plugin to [Android SDK v6.7.0](https://github.com/BlinkID/blinkid-android/releases/tag/v6.7.0) and [iOS SDK v6.7.0](https://github.com/BlinkID/blinkid-ios/releases/tag/v6.7.0) diff --git a/sample_files/main.dart b/sample_files/main.dart index ee8fd71..c11edc6 100644 --- a/sample_files/main.dart +++ b/sample_files/main.dart @@ -25,10 +25,10 @@ class _MyAppState extends State { String license; if (Theme.of(context).platform == TargetPlatform.iOS) { license = - "sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUBbGV5SkRjbVZoZEdWa1QyNGlPakUzTVRRM016STRPRE0zTnpVc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PT4PFNbaGYbx8lz0VdMw0rwMahZJsnnMY0+blCuN/m+QolwrXwoZIVhisfNF7p9UPmh44A6nnFILPB2z3pyoV0mmbTrZ/6/sfoWf4v2SlJjpwM5pBxCooWZr4IAmv5YT6Ef3x4iC6U1gL8zUB0T53LpWoY9+CElD"; + "sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUBbGV5SkRjbVZoZEdWa1QyNGlPakUzTWpFd05ERXhPVEU1TnpNc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PaXRHMh9c3BpsrRVzD1u9+toy3Hep9m0cCAY/kOZBBu35CZm+p21zuBMoJTBu1qmrcnfQXfDdZg9ev9Vhp98Zc/hKLernpKO+Ya7SFuphmGeT7OKvObYsMynLYl/Z+207O67wD4z6uLQdaYLzOegmqAQxlAlIvbg"; } else if (Theme.of(context).platform == TargetPlatform.android) { license = - 'sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUAbGV5SkRjbVZoZEdWa1QyNGlPakUzTVRNNE5qWXdNVEE1TURnc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PYrV4CMxsRU+iUM/SeDbRDbjxRQsXIYuDXKzh5n0zmLHgSdRllWR/wE/J2MZ2MkpDdegbPTLRoJV+59G9F1QY8gIW7ua07A6f7wzTGq4laEyCo+f1rOOUBTZfKBIzqUJtR9NZIkb6YMkfLY5cmmNb5vnwIM+9BNI'; + 'sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUAbGV5SkRjbVZoZEdWa1QyNGlPakUzTWpFd05ERXhOalE0T0RRc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PVJY+gDzLo739kPQWdM0fEA/P+8idXKB4sPdzN+N2m1mQFlnhaTmiTWE9V07j3eCZ2OcVjQvb/MA38TwVHVqfKdQh7BukIe6zjKJz7ETss3uoHYhrtZcaPxy3WULrs7kmWBflxMZr12NBViUCRmYfrHPNZpv8ZEv'; } else { license = ""; } @@ -66,10 +66,10 @@ class _MyAppState extends State { String license; if (Theme.of(context).platform == TargetPlatform.iOS) { license = - "sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUBbGV5SkRjbVZoZEdWa1QyNGlPakUzTVRRM016STRPRE0zTnpVc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PT4PFNbaGYbx8lz0VdMw0rwMahZJsnnMY0+blCuN/m+QolwrXwoZIVhisfNF7p9UPmh44A6nnFILPB2z3pyoV0mmbTrZ/6/sfoWf4v2SlJjpwM5pBxCooWZr4IAmv5YT6Ef3x4iC6U1gL8zUB0T53LpWoY9+CElD"; + "sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUBbGV5SkRjbVZoZEdWa1QyNGlPakUzTWpFd05ERXhPVEU1TnpNc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PaXRHMh9c3BpsrRVzD1u9+toy3Hep9m0cCAY/kOZBBu35CZm+p21zuBMoJTBu1qmrcnfQXfDdZg9ev9Vhp98Zc/hKLernpKO+Ya7SFuphmGeT7OKvObYsMynLYl/Z+207O67wD4z6uLQdaYLzOegmqAQxlAlIvbg"; } else if (Theme.of(context).platform == TargetPlatform.android) { license = - 'sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUAbGV5SkRjbVZoZEdWa1QyNGlPakUzTVRNNE5qWXdNVEE1TURnc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PYrV4CMxsRU+iUM/SeDbRDbjxRQsXIYuDXKzh5n0zmLHgSdRllWR/wE/J2MZ2MkpDdegbPTLRoJV+59G9F1QY8gIW7ua07A6f7wzTGq4laEyCo+f1rOOUBTZfKBIzqUJtR9NZIkb6YMkfLY5cmmNb5vnwIM+9BNI'; + 'sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUAbGV5SkRjbVZoZEdWa1QyNGlPakUzTWpFd05ERXhOalE0T0RRc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PVJY+gDzLo739kPQWdM0fEA/P+8idXKB4sPdzN+N2m1mQFlnhaTmiTWE9V07j3eCZ2OcVjQvb/MA38TwVHVqfKdQh7BukIe6zjKJz7ETss3uoHYhrtZcaPxy3WULrs7kmWBflxMZr12NBViUCRmYfrHPNZpv8ZEv'; } else { license = ""; } @@ -139,10 +139,10 @@ class _MyAppState extends State { String license; if (Theme.of(context).platform == TargetPlatform.iOS) { license = - "sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUBbGV5SkRjbVZoZEdWa1QyNGlPakUzTVRRM016STRPRE0zTnpVc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PT4PFNbaGYbx8lz0VdMw0rwMahZJsnnMY0+blCuN/m+QolwrXwoZIVhisfNF7p9UPmh44A6nnFILPB2z3pyoV0mmbTrZ/6/sfoWf4v2SlJjpwM5pBxCooWZr4IAmv5YT6Ef3x4iC6U1gL8zUB0T53LpWoY9+CElD"; + "sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUBbGV5SkRjbVZoZEdWa1QyNGlPakUzTWpFd05ERXhPVEU1TnpNc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PaXRHMh9c3BpsrRVzD1u9+toy3Hep9m0cCAY/kOZBBu35CZm+p21zuBMoJTBu1qmrcnfQXfDdZg9ev9Vhp98Zc/hKLernpKO+Ya7SFuphmGeT7OKvObYsMynLYl/Z+207O67wD4z6uLQdaYLzOegmqAQxlAlIvbg"; } else if (Theme.of(context).platform == TargetPlatform.android) { license = - 'sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUAbGV5SkRjbVZoZEdWa1QyNGlPakUzTVRNNE5qWXdNVEE1TURnc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PYrV4CMxsRU+iUM/SeDbRDbjxRQsXIYuDXKzh5n0zmLHgSdRllWR/wE/J2MZ2MkpDdegbPTLRoJV+59G9F1QY8gIW7ua07A6f7wzTGq4laEyCo+f1rOOUBTZfKBIzqUJtR9NZIkb6YMkfLY5cmmNb5vnwIM+9BNI'; + 'sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUAbGV5SkRjbVZoZEdWa1QyNGlPakUzTWpFd05ERXhOalE0T0RRc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PVJY+gDzLo739kPQWdM0fEA/P+8idXKB4sPdzN+N2m1mQFlnhaTmiTWE9V07j3eCZ2OcVjQvb/MA38TwVHVqfKdQh7BukIe6zjKJz7ETss3uoHYhrtZcaPxy3WULrs7kmWBflxMZr12NBViUCRmYfrHPNZpv8ZEv'; } else { license = ""; }