Skip to content

Commit

Permalink
Merge pull request #171 from BlinkID/release/v6.12.0
Browse files Browse the repository at this point in the history
Release/v6.12.0
  • Loading branch information
mparadina authored Nov 14, 2024
2 parents 169e369 + 928b1d1 commit 1571c67
Show file tree
Hide file tree
Showing 12 changed files with 204 additions and 9 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": "6.11.1",
"version": "6.12.0",
"description": "A small and powerful ID card scanning library",
"cordova": {
"id": "blinkid-cordova",
Expand Down
4 changes: 2 additions & 2 deletions 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="6.11.1">
version="6.12.0">

<name>BlinkIdScanner</name>
<description>A small and powerful ID card scanning library</description>
Expand Down Expand Up @@ -153,7 +153,7 @@
<framework src="AudioToolbox.framework" />
<framework src="OpenGLES.framework" />
<framework src="Accelerate.framework" />
<framework src="src/ios/BlinkID.xcframework" custom="true" embed="true"/>
<framework src="src/ios/blinkid-ios/BlinkID.xcframework" custom="true" embed="true"/>
<preference name="CAMERA_USAGE_DESCRIPTION" default=" " />
<config-file target="*-Info.plist" parent="NSCameraUsageDescription">
<string>$CAMERA_USAGE_DESCRIPTION</string>
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/v6.11.1/BlinkID.xcframework.zip'
LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v6.12.0/BlinkID.xcframework.zip'
FILENAME='BlinkID.xcframework.zip'

# BlinkID framework will be obtained via wget or curl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,42 @@ public UISettings createUISettings(Context context, JSONObject jsonUISettings, R
if (errorGlareDetected != null) {
overlasStringsBuilder.setErrorGlareDetected(errorGlareDetected);
}
String topPageInstructions = getStringFromJSONObject(jsonUISettings, "topPageInstructions");
if (topPageInstructions != null) {
overlasStringsBuilder.setTopPageInstructions(topPageInstructions);
}
String leftPageInstructions = getStringFromJSONObject(jsonUISettings, "leftPageInstructions");
if (leftPageInstructions != null) {
overlasStringsBuilder.setLeftPageInstructions(leftPageInstructions);
}
String rightPageInstructions = getStringFromJSONObject(jsonUISettings, "rightPageInstructions");
if (rightPageInstructions != null) {
overlasStringsBuilder.setRightPageInstructions(rightPageInstructions);
}
String turnTopPageInstructions = getStringFromJSONObject(jsonUISettings, "turnTopPageInstructions");
if (turnTopPageInstructions != null) {
overlasStringsBuilder.setTurnTopPageInstructions(turnTopPageInstructions);
}
String turnLeftPageInstructions = getStringFromJSONObject(jsonUISettings, "turnLeftPageInstructions");
if (turnLeftPageInstructions != null) {
overlasStringsBuilder.setTurnLeftPageInstructions(turnLeftPageInstructions);
}
String turnRightPageInstructions = getStringFromJSONObject(jsonUISettings, "turnRightPageInstructions");
if (turnRightPageInstructions != null) {
overlasStringsBuilder.setTurnRightPageInstructions(turnRightPageInstructions);
}
String errorScanningWrongPageTop = getStringFromJSONObject(jsonUISettings, "errorScanningWrongPageTop");
if (errorScanningWrongPageTop != null) {
overlasStringsBuilder.setErrorScanningWrongPageTop(errorScanningWrongPageTop);
}
String errorScanningWrongPageLeft = getStringFromJSONObject(jsonUISettings, "errorScanningWrongPageLeft");
if (errorScanningWrongPageLeft != null) {
overlasStringsBuilder.setErrorScanningWrongPageLeft(errorScanningWrongPageLeft);
}
String errorScanningWrongPageRight = getStringFromJSONObject(jsonUISettings, "errorScanningWrongPageRight");
if (errorScanningWrongPageRight != null) {
overlasStringsBuilder.setErrorScanningWrongPageRight(errorScanningWrongPageRight);
}
String language = getStringFromJSONObject(jsonUISettings, "language");
if (language != null) {
String country = getStringFromJSONObject(jsonUISettings, "country");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public Recognizer<?> createRecognizer(JSONObject jsonObject) {
recognizer.setReturnSignatureImage(jsonObject.optBoolean("returnSignatureImage", false));
recognizer.setSaveCameraFrames(jsonObject.optBoolean("saveCameraFrames", false));
recognizer.setScanCroppedDocumentImage(jsonObject.optBoolean("scanCroppedDocumentImage", false));
recognizer.setScanPassportDataPageOnly(jsonObject.optBoolean("scanPassportDataPageOnly", true));
recognizer.setSignatureImageDpi(jsonObject.optInt("signatureImageDpi", 250));
recognizer.setSkipUnsupportedBack(jsonObject.optBoolean("skipUnsupportedBack", false));
recognizer.setValidateResultCharacters(jsonObject.optBoolean("validateResultCharacters", true));
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:6.11.2@aar') {
implementation('com.microblink:blinkid:6.12.0@aar') {
transitive = true
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,60 @@ -(MBOverlayViewController *) createOverlayViewController:(NSDictionary *)jsonOve
sett.glareDetectedMessage = (NSString *)errorGlareDetected;
}
}
{
id topPageInstructions = [jsonOverlaySettings valueForKey:@"topPageInstructions"];
if (topPageInstructions != nil) {
sett.scanTopPageInstructions = (NSString *)topPageInstructions;
}
}
{
id leftPageInstructions = [jsonOverlaySettings valueForKey:@"leftPageInstructions"];
if (leftPageInstructions != nil) {
sett.scanLeftPageInstructions = (NSString *)leftPageInstructions;
}
}
{
id rightPageInstructions = [jsonOverlaySettings valueForKey:@"rightPageInstructions"];
if (rightPageInstructions != nil) {
sett.scanRightPageInstructions = (NSString *)rightPageInstructions;
}
}
{
id turnTopPageInstructions = [jsonOverlaySettings valueForKey:@"turnTopPageInstructions"];
if (turnTopPageInstructions != nil) {
sett.turnTopPageInstructions = (NSString *)turnTopPageInstructions;
}
}
{
id turnLeftPageInstructions = [jsonOverlaySettings valueForKey:@"turnLeftPageInstructions"];
if (turnLeftPageInstructions != nil) {
sett.turnLeftPageInstructions = (NSString *)turnLeftPageInstructions;
}
}
{
id turnRightPageInstructions = [jsonOverlaySettings valueForKey:@"turnRightPageInstructions"];
if (turnRightPageInstructions != nil) {
sett.turnRightPageInstructions = (NSString *)turnRightPageInstructions;
}
}
{
id errorScanningWrongPageTop = [jsonOverlaySettings valueForKey:@"errorScanningWrongPageTop"];
if (errorScanningWrongPageTop != nil) {
sett.scanningWrongSidePassportTopMessage = (NSString *)errorScanningWrongPageTop;
}
}
{
id errorScanningWrongPageLeft = [jsonOverlaySettings valueForKey:@"errorScanningWrongPageLeft"];
if (errorScanningWrongPageLeft != nil) {
sett.scanningWrongSidePassportLeftMessage = (NSString *)errorScanningWrongPageLeft;
}
}
{
id errorScanningWrongPageRight = [jsonOverlaySettings valueForKey:@"errorScanningWrongPageRight"];
if (errorScanningWrongPageRight != nil) {
sett.scanningWrongSidePassportRightMessage = (NSString *)errorScanningWrongPageRight;
}
}

return [[MBBlinkIdOverlayViewController alloc] initWithSettings:sett recognizerCollection:recognizerCollection delegate:self];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ -(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
recognizer.scanCroppedDocumentImage = [(NSNumber *)scanCroppedDocumentImage boolValue];
}
}
{
id scanPassportDataPageOnly = [jsonRecognizer valueForKey:@"scanPassportDataPageOnly"];
if (scanPassportDataPageOnly != nil) {
recognizer.scanPassportDataPageOnly = [(NSNumber *)scanPassportDataPageOnly boolValue];
}
}
{
id signatureImageDpi = [jsonRecognizer valueForKey:@"signatureImageDpi"];
if (signatureImageDpi != nil) {
Expand Down
77 changes: 77 additions & 0 deletions BlinkID/www/blinkIdScanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -2867,6 +2867,75 @@ function BlinkIdOverlaySettings() {
* Default: false
*/
this.enableAndroidLegacyCameraApi = false;

/**
* String: Instructions to scan the passport, shown when scanning of the first side is done, before
* scanning the second side of the document.
*
* If null, default value will be used.
*/
this.topPageInstructions = null;

/**
* String: Instructions to scan the passport, shown when scanning of the first side is done, before scanning the second
* side of the document.
*
* If null, default value will be used.
*/
this.leftPageInstructions = null;

/**
* String: Instructions to scan the passport, shown when scanning of the first side is done, before scanning the second
* side of the document.
*
* If null, default value will be used.
*/
this.rightPageInstructions = null;

/**
* String: Instructions to scan the passport, shown when scanning of the first side is done, before scanning the second
* side of the document.
*
* If null, default value will be used.
*/
this.turnTopPageInstructions = null;

/**
* String: Instructions to scan the passport, shown when scanning of the first side is done, before scanning the second
* side of the document.
*
* If null, default value will be used.
*/
this.turnLeftPageInstructions = null;

/**
* String: Instructions to scan the passport, shown when scanning of the first side is done, before scanning the second
* side of the document.
*
* If null, default value will be used.
*/
this.turnRightPageInstructions = null;

/**
* String: Instructions for the user when wrong side of passport is being scanned.
*
* If null, default value will be used.
*/
this.errorScanningWrongPageTop = null;

/**
* String: Instructions for the user when wrong side of passport is being scanned.
*
* If null, default value will be used.
*/
this.errorScanningWrongPageLeft = null;

/**
* String: Instructions for the user when wrong side of passport is being scanned.
*
* If null, default value will be used.
*/
this.errorScanningWrongPageRight = null;
}

BlinkIdOverlaySettings.prototype = new OverlaySettings();
Expand Down Expand Up @@ -3459,6 +3528,14 @@ function BlinkIdMultiSideRecognizer() {
*/
this.scanCroppedDocumentImage = false;

/**
* Scan only the data page ( page containing MRZ ) of the passport.
* If set to `false`, it will be required to scan the second page of certain passports.
*
*
*/
this.scanPassportDataPageOnly = true;

/**
* Property for setting DPI for signature images
* Valid ranges are [100,400]. Setting DPI out of valid ranges throws an exception
Expand Down
18 changes: 18 additions & 0 deletions Release notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 6.12.0

- Updated the plugin to [Android SDK v6.12.0](https://github.com/BlinkID/blinkid-android/releases/tag/v6.12.0) and [iOS SDK v6.12.0](https://github.com/BlinkID/blinkid-ios/releases/tag/v6.12.0)

**New features**
- **Beta Feature: Second Page Passport Scanning**
- Added support for scanning and extracting data from the second page of passports for select countries - Slovenia, Ireland, and New Zealand.
- When BlinkID detects one of these passports, a UI message will guide the user to the second page.
- By default, this feature is disabled but can be enabled via the `BlinkIdMultiSideRecognizer.scanPassportDataPageOnly` setting - if set to `false`, it will be required to scan the second page of certain passports. This feature is in beta, and your feedback is appreciated.
- USA Green Card - Enabled Data Match for the `Document Number` field, matching values from the VIZ (Visual Inspection Zone) and MRZ to further enhance extraction reliability.

**Bug fixes**
- Spain ID: Fixed an issue with indefinite expiry dates, ensuring consistent values between the MRZ and Visual Inspection Zone (VIZ).
- Bulgaria ID: Improved parsing for indefinite expiry dates in the MRZ for better accuracy.
- Netherlands ID & Norway Passport: Resolved issues with the `Personal ID number` field that were causing the data match feature to fail.
- Chinese Passport: Enhanced reliability of extracted data with additional logic for the `Document Number` field.
- German ID & Luxembourg ID: Adjusted name extraction logic to resolve issues with name separation, ensuring more consistent results.

## 6.11.1

- We have updated the plugin to [Android SDK v6.11.2](https://github.com/BlinkID/blinkid-android/releases/tag/v6.11.2) and [iOS SDK v6.11.1](https://github.com/BlinkID/blinkid-ios/releases/tag/v6.11.1)
Expand Down
7 changes: 5 additions & 2 deletions initCordovaSampleApp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ cordova prepare

# how to run
echo "To run iOS demo application:
1. Open Xcode project $APP_NAME/platforms/ios/$APP_NAME.xcodeproj
1. Open Xcode project in the following path: $APP_NAME/platforms/ios/$APP_NAME.xcodeproj
2. Add the NSPhotoLibraryUsageDescription key to Info.plist if DirectAPI will be used
3. Set your development team."
echo "To run Android demo application, position to $APP_NAME folder and type: cordova run android"
echo ""
echo "To run Android demo application:
1. Position to the $APP_NAME folder
2. Run the command: cordova run android"
4 changes: 2 additions & 2 deletions sample_files/www/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ var app = {

// package name/bundleID com.microblink.sample
var licenseKeys = {
android: 'sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUAbGV5SkRjbVZoZEdWa1QyNGlPakUzTWprMk56STFOemt5TlRZc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PcrAOSeJRWm8NpTScxgcudqfZAkJmFrFr6acjOpEO99vEkqAQpfhPkpGzPHlR73WkYjLL9NmiCAChWAzur4NI0t26FrnVqr/1NZes61Q4iCKi9leea2ygLf1wzLGRw8V/XDjWm/2Exb3NbsL9rWW7PHO2P7XzyPhpQ==',
ios: 'sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUBbGV5SkRjbVZoZEdWa1QyNGlPakUzTWprMk56STJNek14TWprc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PZMSFIDjfsc2m+8UnhzvMhED/AmC88IsR2fZxwubpmi0qD4pb5d5WCrFKgZ1cEBZ2DpfK4L4MAPlARj2c24GmAyYAjd8JFuQeN+ZrBQfRBnF/8bBidrvxcMGyzC/AMpWF6Lqw+YbjNfI4vWNHfjbcKqzE+ns4SQDQA=='
android: 'sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUAbGV5SkRjbVZoZEdWa1QyNGlPakUzTXpFMU9EazFNakkzTWpBc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PQgQAmS4jMWlpIrTFuTqNnmxtVlnmcIZur0BfSOYe5024g5BmY6We9lpvD9ok9ZhVhIzz2vVQMdtkCSPemMV9a2kUJu29JfQh97EJibWCo8m02dLKzb+GTJW/9FwErIJWnn2U2JqMdpEytj4xj5ElDQzBm0v6VGUbg==',
ios: 'sRwCABVjb20ubWljcm9ibGluay5zYW1wbGUBbGV5SkRjbVZoZEdWa1QyNGlPakUzTXpFMU9EazFPRFExTVRJc0lrTnlaV0YwWldSR2IzSWlPaUprWkdRd05qWmxaaTAxT0RJekxUUXdNRGd0T1RRNE1DMDFORFU0WWpBeFlUVTJZamdpZlE9PVcl5cUobHO9HsKUmIo2hNgFPbgbNajREsH4k/WP2Zc0QwRQx0ObfqDc14FFJvSYxj8u+PR91m+23+ZuopgaHpVl+QZcbIm5jX8Te04hqQSuPxG/JGIrSxrr7Ic0kAYj9l4YoHH8DHdtRqboelGrrMs0g8JjtrpyLA=='
};

function buildResult(result, key) {
Expand Down

0 comments on commit 1571c67

Please sign in to comment.