diff --git a/BlinkID/package.json b/BlinkID/package.json index e6d3367..e12dab0 100644 --- a/BlinkID/package.json +++ b/BlinkID/package.json @@ -1,6 +1,6 @@ { "name": "blinkid-cordova", - "version": "6.10.0", + "version": "6.11.0", "description": "A small and powerful ID card scanning library", "cordova": { "id": "blinkid-cordova", diff --git a/BlinkID/plugin.xml b/BlinkID/plugin.xml index 40de681..03a53f0 100644 --- a/BlinkID/plugin.xml +++ b/BlinkID/plugin.xml @@ -2,7 +2,7 @@ + version="6.11.0"> BlinkIdScanner A small and powerful ID card scanning library @@ -153,7 +153,7 @@ - + $CAMERA_USAGE_DESCRIPTION diff --git a/BlinkID/scripts/initIOSFramework.sh b/BlinkID/scripts/initIOSFramework.sh index b7e047a..11829af 100755 --- a/BlinkID/scripts/initIOSFramework.sh +++ b/BlinkID/scripts/initIOSFramework.sh @@ -4,7 +4,7 @@ HERE="$(dirname "$(test -L "$0" && readlink "$0" || echo "$0")")" pushd "${HERE}/../src/ios/" > /dev/null -LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v6.10.1/BlinkID.xcframework.zip' +LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v6.11.0/BlinkID.xcframework.zip' FILENAME='BlinkID.xcframework.zip' # BlinkID framework will be obtained via wget or curl diff --git a/BlinkID/src/android/java/com/microblink/blinkid/plugins/cordova/recognizers/serialization/BlinkIDSerializationUtils.java b/BlinkID/src/android/java/com/microblink/blinkid/plugins/cordova/recognizers/serialization/BlinkIDSerializationUtils.java index a87d692..cc8b53d 100644 --- a/BlinkID/src/android/java/com/microblink/blinkid/plugins/cordova/recognizers/serialization/BlinkIDSerializationUtils.java +++ b/BlinkID/src/android/java/com/microblink/blinkid/plugins/cordova/recognizers/serialization/BlinkIDSerializationUtils.java @@ -32,6 +32,8 @@ import com.microblink.blinkid.entities.recognizers.blinkid.generic.DocumentNumberAnonymizationSettings; import com.microblink.blinkid.entities.recognizers.blinkid.generic.CustomClassRules; import com.microblink.blinkid.entities.recognizers.blinkid.generic.DetailedFieldType; +import com.microblink.blinkid.entities.recognizers.blinkid.generic.DependentInfo; + import org.json.JSONArray; import org.json.JSONException; @@ -274,18 +276,21 @@ public static JSONObject serializeStringResult(StringResult stringResult) throws jsonStringResult.put("latin", stringResult.value(AlphabetType.Latin)); jsonStringResult.put("arabic", stringResult.value(AlphabetType.Arabic)); jsonStringResult.put("cyrillic", stringResult.value(AlphabetType.Cyrillic)); + jsonStringResult.put("greek", stringResult.value(AlphabetType.Greek)); jsonStringResult.put("description", stringResult.toString()); JSONObject jsonFieldLocations = new JSONObject(); jsonFieldLocations.put("latin",SerializationUtils.serializeRectangle(stringResult.location(AlphabetType.Latin))); jsonFieldLocations.put("arabic",SerializationUtils.serializeRectangle(stringResult.location(AlphabetType.Arabic))); jsonFieldLocations.put("cyrillic",SerializationUtils.serializeRectangle(stringResult.location(AlphabetType.Cyrillic))); + jsonFieldLocations.put("greek", SerializationUtils.serializeRectangle(stringResult.location(AlphabetType.Greek))); jsonStringResult.put("location", jsonFieldLocations); JSONObject jsonDocumentSides = new JSONObject(); jsonDocumentSides.put("latin",serializeSide(stringResult.side(AlphabetType.Latin))); jsonDocumentSides.put("arabic",serializeSide(stringResult.side(AlphabetType.Arabic))); jsonDocumentSides.put("cyrillic",serializeSide(stringResult.side(AlphabetType.Cyrillic))); + jsonDocumentSides.put("greek", serializeSide(stringResult.side(AlphabetType.Greek))); jsonStringResult.put("side", jsonDocumentSides); } return jsonStringResult; @@ -438,4 +443,18 @@ public static CustomClassRules[] deserializeCustomClassRules(JSONArray jsonArray return new CustomClassRules[]{}; } } + + public static JSONArray serializeDependentInfo (DependentInfo[] dependentInfos) throws JSONException { + JSONArray jsonDependentInfos = new JSONArray(); + for (int i = 0; i < dependentInfos.length; ++i) { + JSONObject jsonDependetsInfo = new JSONObject(); + jsonDependetsInfo.put("dateOfBirth", BlinkIDSerializationUtils.serializeDateResult(dependentInfos[i].getDateOfBirth())); + jsonDependetsInfo.put("documentNumber",BlinkIDSerializationUtils.serializeStringResult(dependentInfos[i].getDocumentNumber())); + jsonDependetsInfo.put("sex",BlinkIDSerializationUtils.serializeStringResult(dependentInfos[i].getSex())); + jsonDependetsInfo.put("fullName",BlinkIDSerializationUtils.serializeStringResult(dependentInfos[i].getFullName())); + jsonDependetsInfo.put("empty", dependentInfos[i].isEmpty()); + jsonDependentInfos.put(jsonDependetsInfo); + } + return jsonDependentInfos; + } } \ No newline at end of file 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 aed3df0..213700e 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,11 +67,13 @@ public JSONObject serializeResult(Recognizer recognizer) { jsonResult.put("dateOfExpiry", BlinkIDSerializationUtils.serializeDateResult(result.getDateOfExpiry())); jsonResult.put("dateOfExpiryPermanent", result.isDateOfExpiryPermanent()); jsonResult.put("dateOfIssue", BlinkIDSerializationUtils.serializeDateResult(result.getDateOfIssue())); + jsonResult.put("dependentsInfo", BlinkIDSerializationUtils.serializeDependentInfo(result.getDependentsInfo())); 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("eligibilityCategory", BlinkIDSerializationUtils.serializeStringResult(result.getEligibilityCategory())); jsonResult.put("employer", BlinkIDSerializationUtils.serializeStringResult(result.getEmployer())); jsonResult.put("expired", result.isExpired()); jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); @@ -90,6 +92,7 @@ public JSONObject serializeResult(Recognizer recognizer) { jsonResult.put("issuingAuthority", BlinkIDSerializationUtils.serializeStringResult(result.getIssuingAuthority())); jsonResult.put("lastName", BlinkIDSerializationUtils.serializeStringResult(result.getLastName())); jsonResult.put("localizedName", BlinkIDSerializationUtils.serializeStringResult(result.getLocalizedName())); + jsonResult.put("manufacturingYear", BlinkIDSerializationUtils.serializeStringResult(result.getManufacturingYear())); jsonResult.put("maritalStatus", BlinkIDSerializationUtils.serializeStringResult(result.getMaritalStatus())); jsonResult.put("mothersName", BlinkIDSerializationUtils.serializeStringResult(result.getMothersName())); jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); @@ -107,7 +110,9 @@ public JSONObject serializeResult(Recognizer recognizer) { jsonResult.put("scanningFirstSideDone", result.isScanningFirstSideDone()); jsonResult.put("sex", BlinkIDSerializationUtils.serializeStringResult(result.getSex())); jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); + jsonResult.put("specificDocumentValidity", BlinkIDSerializationUtils.serializeStringResult(result.getSpecificDocumentValidity())); jsonResult.put("sponsor", BlinkIDSerializationUtils.serializeStringResult(result.getSponsor())); + jsonResult.put("vehicleType", BlinkIDSerializationUtils.serializeStringResult(result.getVehicleType())); jsonResult.put("visaType", BlinkIDSerializationUtils.serializeStringResult(result.getVisaType())); } catch (JSONException e) { // see https://developer.android.com/reference/org/json/JSONException 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 1b9b198..3633df1 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,11 +60,13 @@ public JSONObject serializeResult(Recognizer recognizer) { jsonResult.put("dateOfExpiry", BlinkIDSerializationUtils.serializeDateResult(result.getDateOfExpiry())); jsonResult.put("dateOfExpiryPermanent", result.isDateOfExpiryPermanent()); jsonResult.put("dateOfIssue", BlinkIDSerializationUtils.serializeDateResult(result.getDateOfIssue())); + jsonResult.put("dependentsInfo", BlinkIDSerializationUtils.serializeDependentInfo(result.getDependentsInfo())); 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("eligibilityCategory", BlinkIDSerializationUtils.serializeStringResult(result.getEligibilityCategory())); jsonResult.put("employer", BlinkIDSerializationUtils.serializeStringResult(result.getEmployer())); jsonResult.put("expired", result.isExpired()); jsonResult.put("faceImage", SerializationUtils.encodeImageBase64(result.getFaceImage())); @@ -78,6 +80,7 @@ public JSONObject serializeResult(Recognizer recognizer) { jsonResult.put("issuingAuthority", BlinkIDSerializationUtils.serializeStringResult(result.getIssuingAuthority())); jsonResult.put("lastName", BlinkIDSerializationUtils.serializeStringResult(result.getLastName())); jsonResult.put("localizedName", BlinkIDSerializationUtils.serializeStringResult(result.getLocalizedName())); + jsonResult.put("manufacturingYear", BlinkIDSerializationUtils.serializeStringResult(result.getManufacturingYear())); jsonResult.put("maritalStatus", BlinkIDSerializationUtils.serializeStringResult(result.getMaritalStatus())); jsonResult.put("mothersName", BlinkIDSerializationUtils.serializeStringResult(result.getMothersName())); jsonResult.put("mrzResult", BlinkIDSerializationUtils.serializeMrzResult(result.getMrzResult())); @@ -94,7 +97,9 @@ public JSONObject serializeResult(Recognizer recognizer) { jsonResult.put("residentialStatus", BlinkIDSerializationUtils.serializeStringResult(result.getResidentialStatus())); jsonResult.put("sex", BlinkIDSerializationUtils.serializeStringResult(result.getSex())); jsonResult.put("signatureImage", SerializationUtils.encodeImageBase64(result.getSignatureImage())); + jsonResult.put("specificDocumentValidity", BlinkIDSerializationUtils.serializeStringResult(result.getSpecificDocumentValidity())); jsonResult.put("sponsor", BlinkIDSerializationUtils.serializeStringResult(result.getSponsor())); + jsonResult.put("vehicleType", BlinkIDSerializationUtils.serializeStringResult(result.getVehicleType())); jsonResult.put("visaType", BlinkIDSerializationUtils.serializeStringResult(result.getVisaType())); jsonResult.put("vizResult", BlinkIDSerializationUtils.serializeVizResult(result.getVizResult())); } catch (JSONException e) { diff --git a/BlinkID/src/android/libBlinkID.gradle b/BlinkID/src/android/libBlinkID.gradle index 1b5c32b..e738e60 100644 --- a/BlinkID/src/android/libBlinkID.gradle +++ b/BlinkID/src/android/libBlinkID.gradle @@ -6,7 +6,7 @@ repositories { } dependencies { - implementation('com.microblink:blinkid:6.10.0@aar') { + implementation('com.microblink:blinkid:6.11.1@aar') { transitive = true } } diff --git a/BlinkID/src/ios/sources/CDVBlinkIDScanner.m b/BlinkID/src/ios/sources/CDVBlinkIDScanner.m index 8d75114..6aed94c 100644 --- a/BlinkID/src/ios/sources/CDVBlinkIDScanner.m +++ b/BlinkID/src/ios/sources/CDVBlinkIDScanner.m @@ -87,6 +87,7 @@ - (void)scanWithCamera:(CDVInvokedUrlCommand *)command { MBOverlayViewController *overlayVC = [[MBOverlaySettingsSerializers sharedInstance] createOverlayViewController:jsonOverlaySettings recognizerCollection:self.recognizerCollection delegate:self]; UIViewController* recognizerRunnerViewController = [MBViewControllerFactory recognizerRunnerViewControllerWithOverlayViewController:overlayVC]; + [recognizerRunnerViewController setModalPresentationStyle:UIModalPresentationFullScreen]; self.scanningViewController = recognizerRunnerViewController; diff --git a/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.h b/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.h index c0d2031..12e262b 100644 --- a/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.h +++ b/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.h @@ -31,4 +31,5 @@ +(NSNumber * _Nullable)serializeMBSide:(MBSide) value; +(NSDictionary * _Nonnull) serializeNSDate:(NSDate * _Nullable) value; +(MBCustomClassRules * _Nonnull) deserializeMBCustomClassRules:(NSDictionary * _Nullable)jsonCustomClassRules; ++(NSMutableArray * _Nullable) serializeDependentInfo:(NSArray* _Nullable)dependentInfos; @end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m b/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m index 171d208..cb8e703 100644 --- a/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m +++ b/BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m @@ -362,18 +362,21 @@ + (NSDictionary *)serializeMBStringResult:(MBStringResult *) value { [dict setValue:[value valueForAlphabetType:MBAlphabetTypeLatin] forKey:@"latin"]; [dict setValue:[value valueForAlphabetType:MBAlphabetTypeArabic] forKey:@"arabic"]; [dict setValue:[value valueForAlphabetType:MBAlphabetTypeCyrillic] forKey:@"cyrillic"]; + [dict setValue:[value valueForAlphabetType:MBAlphabetTypeGreek] forKey:@"greek"]; [dict setValue:value.description forKey:@"description"]; NSMutableDictionary *location = [NSMutableDictionary dictionary]; [location setValue:[MBSerializationUtils serializeCGRect:[value locationForAlphabetType:MBAlphabetTypeLatin]] forKey:@"latin"]; [location setValue:[MBSerializationUtils serializeCGRect:[value locationForAlphabetType:MBAlphabetTypeArabic]] forKey:@"arabic"]; [location setValue:[MBSerializationUtils serializeCGRect:[value locationForAlphabetType:MBAlphabetTypeCyrillic]] forKey:@"cyrillic"]; + [location setValue:[MBSerializationUtils serializeCGRect:[value locationForAlphabetType:MBAlphabetTypeGreek]] forKey:@"greek"]; [dict setValue:location forKey:@"location"]; NSMutableDictionary *side = [NSMutableDictionary dictionary]; [side setValue:[NSNumber numberWithInteger:[value sideForAlphabetType:MBAlphabetTypeLatin]] forKey:@"latin"]; [side setValue:[NSNumber numberWithInteger:[value sideForAlphabetType:MBAlphabetTypeArabic]] forKey:@"arabic"]; [side setValue:[NSNumber numberWithInteger:[value sideForAlphabetType:MBAlphabetTypeCyrillic]] forKey:@"cyrillic"]; + [side setValue:[NSNumber numberWithInteger:[value sideForAlphabetType:MBAlphabetTypeGreek]] forKey:@"greek"]; [dict setValue:side forKey:@"side"]; return dict; @@ -386,4 +389,23 @@ +(NSNumber *)serializeMBSide:(MBSide) value { return [NSNumber numberWithLong:value - 1]; } ++(NSMutableArray *) serializeDependentInfo:(NSArray*)dependentInfos { + + NSMutableArray * jsonDependentInfos = [[NSMutableArray alloc] init]; + + for (MBDependentInfo *dependentInfo in dependentInfos) { + NSDictionary *jsonDependentInfo = + @{ + @"dateOfBirth": [MBBlinkIDSerializationUtils serializeMBDateResult:(dependentInfo.dateOfBirth)], + @"documentNumber": [MBBlinkIDSerializationUtils serializeMBStringResult:(dependentInfo.documentNumber)], + @"sex": [MBBlinkIDSerializationUtils serializeMBStringResult:(dependentInfo.sex)], + @"fullName": [MBBlinkIDSerializationUtils serializeMBStringResult:(dependentInfo.fullName)], + @"empty":[NSNumber numberWithBool:dependentInfo.empty] + }; + [jsonDependentInfos addObject:jsonDependentInfo]; + } + + return jsonDependentInfos; +} + @end \ No newline at end of file diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdMultiSideRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdMultiSideRecognizerWrapper.m index a02fcc8..4ee2cbf 100644 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdMultiSideRecognizerWrapper.m +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdMultiSideRecognizerWrapper.m @@ -220,6 +220,7 @@ -(NSDictionary *) serializeResult { [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.eligibilityCategory] forKey:@"eligibilityCategory"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.employer] forKey:@"employer"]; [jsonResult setValue:[NSNumber numberWithBool:self.result.expired] forKey:@"expired"]; [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; @@ -238,6 +239,7 @@ -(NSDictionary *) serializeResult { [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.issuingAuthority] forKey:@"issuingAuthority"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.lastName] forKey:@"lastName"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.localizedName] forKey:@"localizedName"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.manufacturingYear] forKey:@"manufacturingYear"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.maritalStatus] forKey:@"maritalStatus"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.mothersName] forKey:@"mothersName"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; @@ -255,8 +257,11 @@ -(NSDictionary *) serializeResult { [jsonResult setValue:[NSNumber numberWithBool:self.result.scanningFirstSideDone] forKey:@"scanningFirstSideDone"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.sex] forKey:@"sex"]; [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.specificDocumentValidity] forKey:@"specificDocumentValidity"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.sponsor] forKey:@"sponsor"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.vehicleType] forKey:@"vehicleType"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.visaType] forKey:@"visaType"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeDependentInfo:self.result.dependentInfos] forKey:@"dependentsInfo"]; return jsonResult; } diff --git a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdSingleSideRecognizerWrapper.m b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdSingleSideRecognizerWrapper.m index 60a9172..3c0624b 100644 --- a/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdSingleSideRecognizerWrapper.m +++ b/BlinkID/src/ios/sources/Recognizers/Wrappers/MBBlinkIdSingleSideRecognizerWrapper.m @@ -197,6 +197,7 @@ -(NSDictionary *) serializeResult { [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.eligibilityCategory] forKey:@"eligibilityCategory"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.employer] forKey:@"employer"]; [jsonResult setValue:[NSNumber numberWithBool:self.result.expired] forKey:@"expired"]; [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.faceImage] forKey:@"faceImage"]; @@ -210,6 +211,7 @@ -(NSDictionary *) serializeResult { [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.issuingAuthority] forKey:@"issuingAuthority"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.lastName] forKey:@"lastName"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.localizedName] forKey:@"localizedName"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.manufacturingYear] forKey:@"manufacturingYear"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.maritalStatus] forKey:@"maritalStatus"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.mothersName] forKey:@"mothersName"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMrzResult:self.result.mrzResult] forKey:@"mrzResult"]; @@ -226,9 +228,12 @@ -(NSDictionary *) serializeResult { [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.residentialStatus] forKey:@"residentialStatus"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.sex] forKey:@"sex"]; [jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.signatureImage] forKey:@"signatureImage"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.specificDocumentValidity] forKey:@"specificDocumentValidity"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.sponsor] forKey:@"sponsor"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.vehicleType] forKey:@"vehicleType"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeMBStringResult:self.result.visaType] forKey:@"visaType"]; [jsonResult setValue:[MBBlinkIDSerializationUtils serializeVizResult:self.result.vizResult] forKey:@"vizResult"]; + [jsonResult setValue:[MBBlinkIDSerializationUtils serializeDependentInfo:self.result.dependentInfos] forKey:@"dependentsInfo"]; return jsonResult; } diff --git a/BlinkID/www/blinkIdScanner.js b/BlinkID/www/blinkIdScanner.js index 8ac85aa..ff7d41c 100644 --- a/BlinkID/www/blinkIdScanner.js +++ b/BlinkID/www/blinkIdScanner.js @@ -206,7 +206,7 @@ function RecognizerCollection(recognizerArray) { */ this.allowMultipleResults = false; /** Number of miliseconds after first non-empty result becomes available to end scanning with a timeout */ - this.milisecondsBeforeTimeout = 10000; + this.milisecondsBeforeTimeout = 0; if (!(this.recognizerArray.constructor === Array)) { throw new Error("recognizerArray must be array of Recognizer objects!"); @@ -364,6 +364,9 @@ var AlphabetType = Object.freeze( /** The Cyrillic alphabet type. */ Cyrillic: 2, + + /** The Greek alphabet type. */ + Greek: 3 } ); @@ -1003,6 +1006,7 @@ BlinkID.prototype.Region = Object.freeze( Haryana: 136, Sergipe: 137, Alagos: 138, + Bangsamoro: 139 } ); @@ -1082,6 +1086,12 @@ BlinkID.prototype.Type = Object.freeze( EId: 68, Pass: 69, SisId: 70, + AsicCard: 71, + BidoonCard: 72, + InterimHealthInsuranceCard: 73, + NonVoterId: 74, + ReciprocalHealthInsuranceCard: 75, + VehicleRegistration: 76 } ); @@ -1131,7 +1141,15 @@ BlinkID.prototype.FieldType = Object.freeze ( VisaType: 38, DocumentSubtype: 39, Remarks: 40, - ResidencePermitType: 41 + ResidencePermitType: 41, + ManufacturingYear: 42, + VehicleType: 43, + DependentDateOfBirth: 44, + DependentSex: 45, + DependentDocumentNumber: 46, + DependentFullName: 47, + EligibilityCategory: 48, + SpecificDocumentValidity: 49 } ); @@ -3040,6 +3058,11 @@ function BlinkIdMultiSideRecognizerResult(nativeResult) { */ this.driverLicenseDetailedInfo = nativeResult.driverLicenseDetailedInfo; + /** + * The manufacturing year.. + */ + this.eligibilityCategory = nativeResult.eligibilityCategory; + /** * The employer of the document owner. */ @@ -3136,6 +3159,11 @@ function BlinkIdMultiSideRecognizerResult(nativeResult) { */ this.localizedName = nativeResult.localizedName; + /** + * The manufacturing year. + */ + this.manufacturingYear = nativeResult.manufacturingYear; + /** * The marital status of the document owner. */ @@ -3222,16 +3250,31 @@ function BlinkIdMultiSideRecognizerResult(nativeResult) { */ this.signatureImage = nativeResult.signatureImage; + /** + * The specific document validity. + */ + this.specificDocumentValidity = nativeResult.specificDocumentValidity; + /** * The sponsor of the document owner. */ this.sponsor = nativeResult.sponsor; + /** + * The eligibility category. + */ + this.vehicleType = nativeResult.vehicleType; + /** * The visa type. */ this.visaType = nativeResult.visaType; + /** + * The dependents info. + */ + this.dependentsInfo = nativeResult.dependentsInfo; + } BlinkIdMultiSideRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); @@ -3565,6 +3608,11 @@ function BlinkIdSingleSideRecognizerResult(nativeResult) { */ this.driverLicenseDetailedInfo = nativeResult.driverLicenseDetailedInfo; + /** + * The manufacturing year.. + */ + this.eligibilityCategory = nativeResult.eligibilityCategory; + /** * The employer of the document owner. */ @@ -3636,6 +3684,11 @@ function BlinkIdSingleSideRecognizerResult(nativeResult) { */ this.localizedName = nativeResult.localizedName; + /** + * The manufacturing year. + */ + this.manufacturingYear = nativeResult.manufacturingYear; + /** * The marital status of the document owner. */ @@ -3716,11 +3769,21 @@ function BlinkIdSingleSideRecognizerResult(nativeResult) { */ this.signatureImage = nativeResult.signatureImage; + /** + * The specific document validity. + */ + this.specificDocumentValidity = nativeResult.specificDocumentValidity; + /** * The sponsor of the document owner. */ this.sponsor = nativeResult.sponsor; + /** + * The eligibility category. + */ + this.vehicleType = nativeResult.vehicleType; + /** * The visa type. */ @@ -3731,6 +3794,11 @@ function BlinkIdSingleSideRecognizerResult(nativeResult) { */ this.vizResult = nativeResult.vizResult; + /** + * The dependents info. + */ + this.dependentsInfo = nativeResult.dependentsInfo; + } BlinkIdSingleSideRecognizerResult.prototype = new RecognizerResult(RecognizerResultState.empty); diff --git a/Release notes.md b/Release notes.md index 636743e..6ae9bbe 100644 --- a/Release notes.md +++ b/Release notes.md @@ -1,3 +1,24 @@ +## 6.11.0 + +- We have updated the plugin to [Android SDK v6.11.1](https://github.com/BlinkID/blinkid-android/releases/tag/v6.11.1) and [iOS SDK v6.11.0](https://github.com/BlinkID/blinkid-ios/releases/tag/v6.11.0) + +**Expanded document coverage** + +- All of the new documents & document versions can also be found in the release notes for native Android and iOS SDKs. + +**New features** + +- **Greek Alphabet Support** + - Added support for extracting `Place of Birth` in both Greek and Latin scripts. +- New result fields in the `BlinkIdSingleSideRecognizer` and `BlinkIdMultiSideRecognizer` + - `manufacturingYear`, `vehicleType`, `eligibilityCategory`, `specificDocumentValidity`, `dependentsInfo` + +**Bug fixes** + +- Android specific + - Removed unused `libc++_shared.so` from the SDK + - Fix for duplicate attrs resource: `attr/mb_onboardingImageColor` when combining multiple Microblink's SDKs in the same app + ## 6.10.0 - We have updated the plugin to [Android SDK v6.10.0](https://github.com/BlinkID/blinkid-android/releases/tag/v6.10.0) and [iOS SDK v6.10.1](https://github.com/BlinkID/blinkid-ios/releases/tag/v6.10.1) diff --git a/sample_files/www/js/index.js b/sample_files/www/js/index.js index 70918db..121067b 100644 --- a/sample_files/www/js/index.js +++ b/sample_files/www/js/index.js @@ -75,8 +75,8 @@ var app = { // package name/bundleID com.microblink.sample var licenseKeys = { - android: 'sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUAbGV5SkRjbVZoZEdWa1QyNGlPakUzTWpZeU1qUTBPVEl5TWpZc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PXQNidKfA1+JdDcfPUPR44JcbqkbzQ867V6RVb/irLycCeXhuw6vU9xzTRiZBod5rUu3UqBuhDLKEnNQP/shO/+3931MB0f0h0+v+OhD9o5I7mpEDBUtWom9CcBUTmeopg1xVK33nDCdvbSG4uIcMnDxRIDtvBuGUA==', - ios: 'sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUBbGV5SkRjbVZoZEdWa1QyNGlPakUzTWpZeU1qUTBOREV4TlRVc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PT1RBvlVFNnN5vSYtKXoYbxdgauBZh+zoCoAdYK7mPUsKpG6LIuSiHpwxpmgMOvzqm9rHsPzSBlPkEymEZhziTn3mwBFPNp4d2N52K9XL8H811OyN1FJ38zN4OYVhnVJsqMzSRO37uj1XGwgt4yYmHaDQpvQYxABww==' + android: 'sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUAbGV5SkRjbVZoZEdWa1QyNGlPakUzTWpnMU5EWXdOVE00TkRZc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PT6Q/yp5K4JPVixzo+Jj9J4ThX9nF+z9jdcpfX0IM1lJUzt7lCfP49owoNUeFitV5RdXu23akdaxknN/edgC+lvCMp3gQTO0n6oXkga7kdOguDnpxRCwEenPn+TNcx3A1LP2J6mPMl0wuFqSnu3bqDuLOl0RA1grxg==', + ios: 'sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUBbGV5SkRjbVZoZEdWa1QyNGlPakUzTWpnMU5EWXdNVEUyT1Rrc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PWiGh3F9vddaU7/XSHgERVnIpsUI9C6KPMVYus1M/1v2gU9jXcc8r/Tv+g3e1YYPfQUJQDQqpWPpTvKXyJ+ptFQ8du0iPkuArGa549ovdc1Cqj/Gih5YVthIH9oBRat8Kjk6pHLwvAr/cvjROIUZnRX/aP5t3tiX1A==' }; function buildResult(result, key) {