Skip to content

Commit

Permalink
Merge pull request #152 from BlinkID/release/v5.17.0
Browse files Browse the repository at this point in the history
Release/v5.17.0
  • Loading branch information
mijo-gracanin authored Jun 30, 2022
2 parents 7e4a463 + b5b1abf commit 212fd6c
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 6 deletions.
2 changes: 1 addition & 1 deletion BlinkID/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blinkid-cordova",
"version": "5.16.1",
"version": "5.17.0",
"description": "A small and powerful ID card scanning library",
"cordova": {
"id": "blinkid-cordova",
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="blinkid-cordova"
version="5.16.1">
version="5.17.0">

<name>BlinkIdScanner</name>
<description>A small and powerful ID card scanning library</description>
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/scripts/initIOSFramework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/v5.16.1/Microblink.xcframework.zip'
LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v5.17.0/Microblink.xcframework.zip'
FILENAME='Microblink.xcframework.zip'

# check if Microblink framework and bundle already exist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import com.microblink.entities.recognizers.blinkid.mrtd.MrzResult;
import com.microblink.entities.recognizers.blinkid.generic.DriverLicenseDetailedInfo;
import com.microblink.entities.recognizers.blinkid.generic.DataMatchDetailedInfo;
import com.microblink.entities.recognizers.blinkid.generic.VehicleClassInfo;
import com.microblink.entities.recognizers.blinkid.generic.classinfo.ClassInfo;
import com.microblink.entities.recognizers.blinkid.generic.imageanalysis.ImageAnalysisResult;
Expand Down Expand Up @@ -70,6 +71,15 @@ public static JSONObject serializeVehicleClassInfo(VehicleClassInfo vehicleClass
return jsonVehicleClassInfo;
}

public static JSONObject serializeDataMatchDetailedInfo(DataMatchDetailedInfo dataMatchDetailedInfo) throws JSONException {
JSONObject jsonDataMatch = new JSONObject();
jsonDataMatch.put("dateOfBirth", SerializationUtils.serializeEnum(dataMatchDetailedInfo.getDateOfBirth()));
jsonDataMatch.put("dateOfExpiry", SerializationUtils.serializeEnum(dataMatchDetailedInfo.getDateOfExpiry()));
jsonDataMatch.put("documentNumber", SerializationUtils.serializeEnum(dataMatchDetailedInfo.getDocumentNumber()));
jsonDataMatch.put("dataMatchResult", SerializationUtils.serializeEnum(dataMatchDetailedInfo.getDataMatchResult()));
return jsonDataMatch;
}

public static JSONObject serializeClassInfo(ClassInfo classInfo) throws JSONException {
JSONObject jsonClassInfo = new JSONObject();
jsonClassInfo.put("country", SerializationUtils.serializeEnum(classInfo.getCountry()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public JSONObject serializeResult(Recognizer<?> recognizer) {
jsonResult.put("barcodeCameraFrame", SerializationUtils.encodeImageBase64(result.getBarcodeCameraFrame()));
jsonResult.put("barcodeResult", BlinkIDSerializationUtils.serializeBarcodeResult(result.getBarcodeResult()));
jsonResult.put("classInfo", BlinkIDSerializationUtils.serializeClassInfo(result.getClassInfo()));
jsonResult.put("dataMatchDetailedInfo", BlinkIDSerializationUtils.serializeDataMatchDetailedInfo(result.getDataMatchDetailedInfo()));
jsonResult.put("dateOfBirth", SerializationUtils.serializeDate(result.getDateOfBirth()));
jsonResult.put("dateOfExpiry", SerializationUtils.serializeDate(result.getDateOfExpiry()));
jsonResult.put("dateOfExpiryPermanent", result.isDateOfExpiryPermanent());
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/src/android/libBlinkID.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repositories {
}

dependencies {
implementation('com.microblink:blinkid:5.16.1@aar') {
implementation('com.microblink:blinkid:5.17.0@aar') {
transitive = true
}
}
Expand Down
1 change: 1 addition & 0 deletions BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
+(MBImageExtensionFactors) deserializeMBImageExtensionFactors:(NSDictionary * _Nullable)jsonExtensionFactors;
+(NSDictionary * _Nonnull) serializeDriverLicenseDetailedInfo:(MBDriverLicenseDetailedInfo * _Nonnull)driverLicenseDetailedInfo;
+(NSDictionary * _Nonnull) serializeVehicleClassInfo:(MBVehicleClassInfo * _Nonnull)vehicleClassInfo;
+(NSDictionary * _Nonnull) serializeDataMatchDetailedInfo:(MBDataMatchDetailedInfo * _Nonnull)dataMatchDetailedInfo;
+(NSDictionary * _Nonnull) serializeClassInfo:(MBClassInfo * _Nonnull)classInfo;
+(NSDictionary * _Nonnull) serializeVizResult:(MBVizResult * _Nonnull)vizResult;
+(NSDictionary * _Nonnull) serializeBarcodeResult:(MBBarcodeResult * _Nonnull)barcodeResult;
Expand Down
9 changes: 9 additions & 0 deletions BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ +(NSDictionary *) serializeVehicleClassInfo:(MBVehicleClassInfo *)vehicleClassIn
};
}

+(NSDictionary * _Nonnull) serializeDataMatchDetailedInfo:(MBDataMatchDetailedInfo *)dataMatchDetailedInfo {
return @{
@"dateOfBirth" : @([dataMatchDetailedInfo getDateOfBirth]),
@"dateOfExpiry" : @([dataMatchDetailedInfo getDateOfExpiry]),
@"documentNumber" : @([dataMatchDetailedInfo getDocumentNumber]),
@"dataMatchResult" : @([dataMatchDetailedInfo getDataMatchResult])
};
}

+(NSDictionary *) serializeClassInfo:(MBClassInfo *)classInfo {
return @{
@"country" : [NSNumber numberWithInteger:(classInfo.country + 1)],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ -(NSDictionary *) serializeResult {
[jsonResult setValue:[MBSerializationUtils encodeMBImage:self.result.barcodeCameraFrame] forKey:@"barcodeCameraFrame"];
[jsonResult setValue:[MBBlinkIDSerializationUtils serializeBarcodeResult:self.result.barcodeResult] forKey:@"barcodeResult"];
[jsonResult setValue:[MBBlinkIDSerializationUtils serializeClassInfo:self.result.classInfo] forKey:@"classInfo"];
[jsonResult setValue:[MBBlinkIDSerializationUtils serializeDataMatchDetailedInfo:self.result.dataMatchDetailedInfo] forKey:@"dataMatchDetailedInfo"];
[jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfBirth] forKey:@"dateOfBirth"];
[jsonResult setValue:[MBSerializationUtils serializeMBDateResult:self.result.dateOfExpiry] forKey:@"dateOfExpiry"];
[jsonResult setValue:[NSNumber numberWithBool:self.result.dateOfExpiryPermanent] forKey:@"dateOfExpiryPermanent"];
Expand Down
5 changes: 5 additions & 0 deletions BlinkID/www/blinkIdScanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -2432,6 +2432,11 @@ function BlinkIdCombinedRecognizerResult(nativeResult) {
*/
this.classInfo = nativeResult.classInfo;

/**
* Detailed info on data match.
*/
this.dataMatchDetailedInfo = nativeResult.dataMatchDetailedInfo;

/**
* The date of birth of the document owner.
*/
Expand Down
3 changes: 3 additions & 0 deletions Release notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 5.17.0
- Updated to [Android SDK v5.17.0](https://github.com/BlinkID/blinkid-android/releases/tag/v5.17.0) and [iOS SDK v5.17.0](https://github.com/BlinkID/blinkid-ios/releases/tag/v5.17.0)

## 5.16.0
- Updated to [Android SDK v5.16.0](https://github.com/BlinkID/blinkid-android/releases/tag/v5.16.0) and [iOS SDK v5.16.0](https://github.com/BlinkID/blinkid-ios/releases/tag/v5.16.0)

Expand Down
12 changes: 10 additions & 2 deletions sample_files/www/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ var app = {

// package name/bundleID com.microblink.sample
var licenseKeys = {
android: 'sRwAAAAVY29tLm1pY3JvYmxpbmsuc2FtcGxlU9kJdZhZkGlTu9XHP2tly7tSD2ZBhUN9mBJgzB+kfcYY69dFpZaHtMkS44AAdMj7JJpg5dTgYeWbstEWDHNjqL0tvLOjYPeS0tfPZz7c3euhPFSj7MJHzxZMYG5wR3mAsGo2iNqv4B3+C5NLQOCc0QNNmWFAG1B3GNCqufRZGxtMiJxrxYrM5WreJ7dl6+TV9zfL2WSc6Uk1VPfVaa/T1VfEu4AGnBte8c4IJA48mvEOWKyh/qwU7joalKv/gJXJknGuUdSzJiOdmeKq+iTRGUoNmp8SL15RV47dZuyaPgE8evDECqGO6GMaz2HOJ/ZqtaYhWR3xHwiKesjsogGr5lo=',
ios: 'sRwAAAEVY29tLm1pY3JvYmxpbmsuc2FtcGxl1BIcP4FpSuS/38KlP3avmLzrsviBmV88MupFPd0dvU7q90na2QxX62I2xowx1Wi9J9I6I5k4V2p1z917NGvULzZqkh1lDbt9eO6M3+Ki1138TbG6imO8S8XFZ+VjaDqUHv/hrjG1e1p8pxtjCPMqJvo8lzQHkjaF+ej4hc8xp5ZSzD+RUI9gxBrVrPewo6v5ug96yWSlD2NqO5XTDsdx71Z/GyXgVvWRdz5Lhl3y7p1HLDpk5cknfWM6Q9xOmiMErMPuiwsWtrQY7X2xm+IVvhnUEW8jDDiNmcJG1W9V9IwVKHl233QUu2mOamKgUjy1VjBYKq235Ui66NqCEkNFvvg='
android: 'sRwAAAAVY29tLm1pY3JvYmxpbmsuc2FtcGxlU9kJdZhZkGlTu9XHO8NDZ5etowTvAoM3PXg5QKNOMEzS+WzcCNYkGg0p7csI0R/oydYtBy2pDTTG1MHqYaFvnxUnpSu1mcXUVUOiddboBBWBXu6Z9Pq5iYIdZ3/HuZFmW1V4PK7S0WiUzzlYDHFNMH+KnaDNnJawX7D7X1S7i9KriklziYyNkX59wv1uOaExxS7FuftzTBtqxMjzOmuwglSXXzrqUE4uwNnAijs9b9Jqr/2Y72qkE+SiBY45N5E0BLpG9ex0NFT/uiLhmd1BEZBrKWouCOPogSmKBE30mawHpesSS/4XsjAZH8a5FqQdsL4QXbeYeHsAcSyDhoiwPw0="',
ios: 'sRwAAAEVY29tLm1pY3JvYmxpbmsuc2FtcGxl1BIcP4FpSuS/38KlOx6IMzWbmaGEGiaL7eNSyKVwZjeUMW3Ax8aKh+quw2aZ4K4wKk+HtsAqjaGiGJSKWfeqZ/hXXpX3Kd7PRq/86AF3lpVWOZPN6FzUB6FVm7jYfVBUag4hYYxvq70616zMDQyaAItml02PvEL8OKbKbBxEYmVzBVpq3ew4JoHyRAaOJQfc9WEKrP4HYd8q4s15+HB/KO24IUVBabZggHMj2hOyAEM7p9dWpA/Q+n6C49w35xLfmcJrjSP0qE25bdTUMMEwhu6xiYmYdtMrqJkwCEIjzEQ04bEB3XWskZl3+AD5kUQH8qyhuEELR/mvbmvwxMBpwpM='
};

function buildResult(result, key) {
Expand Down Expand Up @@ -151,6 +151,14 @@ var app = {
buildResult(blinkIdResult.recognitionMode, "Recognition mode")
;

let dataMatchDetailedInfo = blinkIdResult.dataMatchDetailedInfo;
resultString +=
buildResult(dataMatchDetailedInfo.dataMatchResult, "Data match result") +
buildResult(dataMatchDetailedInfo.dateOfExpiry, "dateOfExpiry") +
buildResult(dataMatchDetailedInfo.dateOfBirth, "dateOfBirth") +
buildResult(dataMatchDetailedInfo.documentNumber, "documentNumber");


var licenceInfo = blinkIdResult.driverLicenseDetailedInfo;
if (licenceInfo) {
var vehicleClassesInfoString = '';
Expand Down

0 comments on commit 212fd6c

Please sign in to comment.