Skip to content

Commit

Permalink
Merge pull request #225 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 bc16bab + 6b8da94 commit 3bbf2e5
Show file tree
Hide file tree
Showing 14 changed files with 465 additions and 267 deletions.
2 changes: 1 addition & 1 deletion BlinkID/blinkid-react-native.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Pod::Spec.new do |s|
s.header_dir = "blinkid-react-native"

s.dependency 'React'
s.dependency 'PPBlinkID', '~> 6.11.1'
s.dependency 'PPBlinkID', '~> 6.12.0'

s.frameworks = 'UIKit'
end
77 changes: 73 additions & 4 deletions BlinkID/overlays/blinkidOverlays.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,80 @@ export class BlinkIdOverlaySettings extends OverlaySettings {
this.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
*/
* 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
*/
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;
}
}

Expand Down
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-react-native",
"version": "6.11.1",
"version": "6.12.0",
"description": "A small and powerful ID card scanning library. Powered by Microblink (www.microblink.com).",
"main": "index.js",
"repository": {
Expand Down
8 changes: 8 additions & 0 deletions BlinkID/recognizers/blinkIdMultiSideRecognizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,14 @@ export class BlinkIdMultiSideRecognizer extends Recognizer {
*/
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
2 changes: 1 addition & 1 deletion BlinkID/src/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ android {

dependencies {
implementation 'com.facebook.react:react-native:+'
implementation('com.microblink:blinkid:6.11.2@aar') {
implementation('com.microblink:blinkid:6.12.0@aar') {
transitive = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,42 @@ public UISettings createUISettings(Context context, ReadableMap jsonUISettings,
if (errorGlareDetected != null) {
overlasStringsBuilder.setErrorGlareDetected(errorGlareDetected);
}
String topPageInstructions = getStringFromMap(jsonUISettings, "topPageInstructions");
if (topPageInstructions != null) {
overlasStringsBuilder.setTopPageInstructions(topPageInstructions);
}
String leftPageInstructions = getStringFromMap(jsonUISettings, "leftPageInstructions");
if (leftPageInstructions != null) {
overlasStringsBuilder.setLeftPageInstructions(leftPageInstructions);
}
String rightPageInstructions = getStringFromMap(jsonUISettings, "rightPageInstructions");
if (rightPageInstructions != null) {
overlasStringsBuilder.setRightPageInstructions(rightPageInstructions);
}
String turnTopPageInstructions = getStringFromMap(jsonUISettings, "turnTopPageInstructions");
if (turnTopPageInstructions != null) {
overlasStringsBuilder.setTurnTopPageInstructions(turnTopPageInstructions);
}
String turnLeftPageInstructions = getStringFromMap(jsonUISettings, "turnLeftPageInstructions");
if (turnLeftPageInstructions != null) {
overlasStringsBuilder.setTurnLeftPageInstructions(turnLeftPageInstructions);
}
String turnRightPageInstructions = getStringFromMap(jsonUISettings, "turnRightPageInstructions");
if (turnRightPageInstructions != null) {
overlasStringsBuilder.setTurnRightPageInstructions(turnRightPageInstructions);
}
String errorScanningWrongPageTop = getStringFromMap(jsonUISettings, "errorScanningWrongPageTop");
if (errorScanningWrongPageTop != null) {
overlasStringsBuilder.setErrorScanningWrongPageTop(errorScanningWrongPageTop);
}
String errorScanningWrongPageLeft = getStringFromMap(jsonUISettings, "errorScanningWrongPageLeft");
if (errorScanningWrongPageLeft != null) {
overlasStringsBuilder.setErrorScanningWrongPageLeft(errorScanningWrongPageLeft);
}
String errorScanningWrongPageRight = getStringFromMap(jsonUISettings, "errorScanningWrongPageRight");
if (errorScanningWrongPageRight != null) {
overlasStringsBuilder.setErrorScanningWrongPageRight(errorScanningWrongPageRight);
}

settings.setStrings(overlasStringsBuilder.build());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ public Recognizer<?> createRecognizer(ReadableMap jsonMap) {
if (jsonMap.hasKey("scanCroppedDocumentImage")) {
recognizer.setScanCroppedDocumentImage(jsonMap.getBoolean("scanCroppedDocumentImage"));
}
if (jsonMap.hasKey("scanPassportDataPageOnly")) {
recognizer.setScanPassportDataPageOnly(jsonMap.getBoolean("scanPassportDataPageOnly"));
}
if (jsonMap.hasKey("signatureImageDpi")) {
recognizer.setSignatureImageDpi(jsonMap.getInt("signatureImageDpi"));
}
Expand Down
Loading

0 comments on commit 3bbf2e5

Please sign in to comment.