Skip to content

Commit

Permalink
Merge pull request #329 from BlinkID/release/v6.10.0
Browse files Browse the repository at this point in the history
Release/v6.10.0
  • Loading branch information
medvedecrobertmb authored Sep 4, 2024
2 parents 294b910 + 4bf1a55 commit b20a5c1
Show file tree
Hide file tree
Showing 45 changed files with 1,621 additions and 795 deletions.
2 changes: 1 addition & 1 deletion BlinkIDSample/BlinkID-ComposeFragmentSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
}
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.0"
kotlinCompilerExtensionVersion = "1.5.15"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
Expand Down
2 changes: 1 addition & 1 deletion BlinkIDSample/BlinkID-ComposeMinimalSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
}
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.0"
kotlinCompilerExtensionVersion = "1.5.15"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ public enum ResultSource {

MIXED,
NONEMPTY,
JSON,
FRONT,
BACK,
MRZ,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public List<RecognitionResultEntry> extractData(Context context, BlinkIdMultiSid
try {
JSONObject json = new JSONObject(jsonResult);
jsonResult = json.toString(4);
} catch(JSONException e) {
} catch (JSONException e) {
// can be ignored
}
extractData(result, resultSource, jsonResult);
Expand All @@ -67,7 +67,7 @@ public List<RecognitionResultEntry> extractData(Context context, BlinkIdMultiSid
protected void extractData(BlinkIdMultiSideRecognizer.Result result, ResultSource resultSource, String jsonResult) {
switch (resultSource) {
case NONEMPTY:
extractMixedNonEmptyResults(result, jsonResult);
extractMixedNonEmptyResults(result);
break;
case FRONT:
extractVisualResults(result.getFrontVizResult());
Expand All @@ -84,6 +84,9 @@ protected void extractData(BlinkIdMultiSideRecognizer.Result result, ResultSourc
case LOCATIONS:
addAllLocationResults(result);
break;
case JSON:
extractJsonResults(jsonResult);
break;
case MIXED:
default:
extractMixedResults(result);
Expand All @@ -102,9 +105,10 @@ private void addAllLocationResults(BlinkIdMultiSideRecognizer.Result result) {
paint.setStyle(Paint.Style.STROKE);
paint.setStrokeWidth(2f);

if(result.getFullDocumentFrontImage() != null){
if (result.getFullDocumentFrontImage() != null) {
Bitmap image = ImageUtils.transformImage(result.getFullDocumentFrontImage());
Bitmap bmOverlay = Bitmap.createBitmap(image.getWidth(), image.getHeight(), image.getConfig()); ;
Bitmap bmOverlay = Bitmap.createBitmap(image.getWidth(), image.getHeight(), image.getConfig());
;
Canvas canvas = new Canvas(bmOverlay);
canvas.drawBitmap(image, new Matrix(), null);
drawLocationsOnBitmap(canvas, paint, frontStringResults, Side.Front);
Expand All @@ -117,9 +121,10 @@ private void addAllLocationResults(BlinkIdMultiSideRecognizer.Result result) {

List<StringResult> backStringResults = getAllStringResultsFromVizResult(result.getBackVizResult());

if(result.getFullDocumentBackImage() != null){
if (result.getFullDocumentBackImage() != null) {
Bitmap image = ImageUtils.transformImage(result.getFullDocumentBackImage());
Bitmap bmOverlay = Bitmap.createBitmap(image.getWidth(), image.getHeight(), image.getConfig()); ;
Bitmap bmOverlay = Bitmap.createBitmap(image.getWidth(), image.getHeight(), image.getConfig());
;
Canvas canvas = new Canvas(bmOverlay);
canvas.drawBitmap(image, new Matrix(), null);
drawLocationsOnBitmap(canvas, paint, backStringResults, Side.Back);
Expand Down Expand Up @@ -232,12 +237,13 @@ private void extractMixedResults(BlinkIdMultiSideRecognizer.Result result) {

add(R.string.PPDataMatch, result.getDataMatch().toString());

add(R.string.MBBarcodeStepUsed, result.isBarcodeStepUsed());
add(R.string.MBFrontCameraFrame, result.getFrontCameraFrame());
add(R.string.MBBackCameraFrame, result.getBackCameraFrame());
add(R.string.MBBarcodeCameraFrame, result.getBarcodeCameraFrame());
}

private void extractMixedNonEmptyResults(BlinkIdMultiSideRecognizer.Result result, String jsonResult) {
private void extractMixedNonEmptyResults(BlinkIdMultiSideRecognizer.Result result) {
addIfNotEmpty(R.string.PPFirstName, result.getFirstName());
addIfNotEmpty(R.string.PPLastName, result.getLastName());
addIfNotEmpty(R.string.PPFullName, result.getFullName());
Expand Down Expand Up @@ -338,9 +344,13 @@ private void extractMixedNonEmptyResults(BlinkIdMultiSideRecognizer.Result resul

addIfNotEmpty(R.string.PPDataMatch, result.getDataMatch().toString());

add(R.string.MBBarcodeStepUsed, result.isBarcodeStepUsed());
add(R.string.MBFrontCameraFrame, result.getFrontCameraFrame());
add(R.string.MBBackCameraFrame, result.getBackCameraFrame());
add(R.string.MBBarcodeCameraFrame, result.getBarcodeCameraFrame());
}

private void extractJsonResults(String jsonResult) {
add(R.string.MBJsonResult, jsonResult);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public List<RecognitionResultEntry> extractData(Context context, BlinkIdSingleSi
protected void extractData(BlinkIdSingleSideRecognizer.Result result, ResultSource resultSource, String jsonResult) {
switch (resultSource) {
case NONEMPTY:
extractMixedNonEmptyResults(result, jsonResult);
extractMixedNonEmptyResults(result);
break;
case FRONT:
extractVisualResults(result.getVizResult());
Expand All @@ -84,6 +84,9 @@ protected void extractData(BlinkIdSingleSideRecognizer.Result result, ResultSour
case LOCATIONS:
addAllLocationResults(result);
break;
case JSON:
extractJsonResults(jsonResult);
break;
case MIXED:
default:
extractMixedResults(result);
Expand Down Expand Up @@ -199,11 +202,12 @@ private void extractMixedResults(BlinkIdSingleSideRecognizer.Result result) {

add(R.string.MBAdditionalProcessingInfo, result.getAdditionalProcessingInfo().toString());

add(R.string.MBBarcodeStepUsed, result.isBarcodeStepUsed());
add(R.string.MBCameraFrame, result.getCameraFrame());
add(R.string.MBBarcodeCameraFrame, result.getBarcodeCameraFrame());
}

private void extractMixedNonEmptyResults(BlinkIdSingleSideRecognizer.Result result, String jsonResult) {
private void extractMixedNonEmptyResults(BlinkIdSingleSideRecognizer.Result result) {
addIfNotEmpty(R.string.PPFirstName, result.getFirstName());
addIfNotEmpty(R.string.PPLastName, result.getLastName());
addIfNotEmpty(R.string.PPFullName, result.getFullName());
Expand Down Expand Up @@ -288,8 +292,12 @@ private void extractMixedNonEmptyResults(BlinkIdSingleSideRecognizer.Result resu

addIfNotEmpty(R.string.MBAdditionalProcessingInfo, result.getAdditionalProcessingInfo().toString());

add(R.string.MBBarcodeStepUsed, result.isBarcodeStepUsed());
add(R.string.MBCameraFrame, result.getCameraFrame());
add(R.string.MBBarcodeCameraFrame, result.getBarcodeCameraFrame());
}

private void extractJsonResults(String jsonResult) {
add(R.string.MBJsonResult, jsonResult);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@
<string name="MBFrontCameraFrame">Front raw camera frame</string>
<string name="MBBackCameraFrame">Back raw camera frame</string>
<string name="MBBarcodeCameraFrame">Barcode raw camera frame</string>
<string name="MBBarcodeStepUsed">Barcode step used</string>
<string name="MBJsonResult">JSON result</string>

<string name="MBDocumentImageColorStatus">Image color status</string>
Expand Down
1 change: 1 addition & 0 deletions BlinkIDSample/LibUtils/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<string-array name="result_types">
<item>Mixed (best)</item>
<item>Mixed (non empty)</item>
<item>JSON</item>
<item>Front side OCR</item>
<item>Back side OCR</item>
<item>MRZ</item>
Expand Down
4 changes: 2 additions & 2 deletions BlinkIDSample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = '1.8.0'
kotlin_version = '1.9.25'
}
repositories {
mavenCentral()
Expand All @@ -25,7 +25,7 @@ allprojects {
// versions of libraries that all modules require

project.ext {
blinkIdVersion = '6.9.0'
blinkIdVersion = '6.10.0'
compileSdkVersion = 34
targetSdkVersion = 34
appCompatVersion = '1.6.1'
Expand Down
3 changes: 2 additions & 1 deletion BlinkIDSample/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ android.defaults.buildfeatures.buildconfig=true
android.enableJetifier=true
android.nonFinalResIds=false
android.nonTransitiveRClass=false
android.useAndroidX=true
android.useAndroidX=true
kotlin.jvm.target.validation.mode = IGNORE
Binary file modified LibBlinkID-javadoc.jar
Binary file not shown.
Binary file modified LibBlinkID.aar
Binary file not shown.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Add _BlinkID_ as a dependency and make sure `transitive` is set to true

```
dependencies {
implementation('com.microblink:blinkid:6.9.0@aar') {
implementation('com.microblink:blinkid:6.10.0@aar') {
transitive = true
}
}
Expand All @@ -127,7 +127,7 @@ Android studio should automatically import javadoc from maven dependency. If tha

1. In Android Studio project sidebar, ensure [project view is enabled](https://developer.android.com/studio/projects#ProjectView)
2. Expand `External Libraries` entry (usually this is the last entry in project view)
3. Locate `blinkid-6.9.0` entry, right click on it and select `Library Properties...`
3. Locate `blinkid-6.10.0` entry, right click on it and select `Library Properties...`
4. A `Library Properties` pop-up window will appear
5. Click the second `+` button in bottom left corner of the window (the one that contains `+` with little globe)
6. Window for defining documentation URL will appear
Expand Down Expand Up @@ -1356,7 +1356,7 @@ Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
> 2 files found with path 'lib/arm64-v8a/libc++_shared.so' from inputs:
- <path>/.gradle/caches/transforms-3/3d428f9141586beb8805ce57f97bedda/transformed/jetified-opencv-4.5.3.0/jni/arm64-v8a/libc++_shared.so
- <path>/.gradle/caches/transforms-3/609476a082a81bd7af00fd16a991ee43/transformed/jetified-blinkid-6.9.0/jni/arm64-v8a/libc++_shared.so
- <path>/.gradle/caches/transforms-3/609476a082a81bd7af00fd16a991ee43/transformed/jetified-blinkid-6.10.0/jni/arm64-v8a/libc++_shared.so
If you are using jniLibs and CMake IMPORTED targets, see
https://developer.android.com/r/tools/jniLibs-vs-imported-targets
```
Expand Down
41 changes: 40 additions & 1 deletion Release notes.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,52 @@
# Release notes

## v6.10.0

### New features
- **Improved reliability and first-time successful scanning experience**
- **_Avoiding Double Scans of the Front Side_**: For a more reliable scanning process, BlinkID now prompts users to flip the document when they scan the front side twice. This improves the overall experience and reduces the chance of mistakes.
- **_Starting with the Right Side_**: If users attempt to scan the back side of a document first, BlinkID will prompt them to begin with the front side. This feature ensures that users follow the correct order, leading to a more reliable and user-friendly experience.
### Expanded document coverage
#### New document versions for supported documents
- Sweden - Social Security Card - Back side
- Bolivia - Driver's License - Back side
- Brazil, Distrito Federal - Identity Card - Back side
#### Out of beta
- Colombia - Temporary Protection Permit
#### New beta documents support
- France - Professional ID
- Mexico - Tax ID
#### New document versions for beta-supported documents
- Brazil, Parana - Identity Card - Back side
- Brazil, Santa Catarina - Identity Card - Back side
#### New segments supported on documents
- Peru - Alien ID - MRZ
### Accessibility improvements
- **Enhanced button contrast** - Improved contrast for the close and flashlight buttons, making them easier to distinguish.
- **Improved focus order** - Enhanced focus order on help and onboarding screens to ensure proper reading of instructions when using TalkBack.
- **Accessible button names** - Added accessible names to the help and flashlight buttons, enabling TalkBack to read them correctly.
- **Glare warning toast** - The toast is now correctly detected and read by TalkBack.
### Bug fixes
- Fallback for barcode scanning - `Barcode ID` recognition mode will now extract information from any supported barcode if full document recognition fails. Initially available only for US and Canadian documents, this feature is now available to all documents.
- MRZ field on US documents - Set to optional by default and currently refers to: Minnesota (DL & ID), New York (DL & ID), Vermont (DL) and Washington (DL & ID).
- `AdditionalProcessingInfo` - In cases of an empty result, this field now provides details about the reasons why scanning failed.
- Improved handling of face photo occlusion - The UI message is slightly changed to prompt users to keep the face photo fully visible when there is a finger occlusion.
### Other changes
- The SDK is now supported on Android 15 16KB page size devices.
- Added `imageExtractionFailures` to `AdditionalProcessingInfo` - this allows clients to actively track if any `ImageExtractionType` (`FullDocument`, `Face`, `Signature`) is not visible on the presented document.
- Added a new result member, `barcodeStepUsed`, to both `BlinkIdSingleSideRecognizer` and `BlinkIdMultiSideRecognizer`. This member indicates whether the barcode scanning step was utilized during the process.
- Added two new settings for `BlinkIdSingleSideRecognizer` and `BlinkIdMultiSideRecognizer`:
- `allowBarcodeScanOnly` - allows barcode recognition to proceed even if the initial extraction fails - set to `false` by default
- `combineFrameResults` - enables the aggregation of data from multiple frames - set to `true` by default

## v6.9.0

### New Features
- **Custom mandatory fields**
- We’re introducing the option for customers to define their own set of mandatory fields. This feature allows greater flexibility in the scanning process by enabling the extraction of only the necessary information from identity documents. Now you can customize the process and focus on only those fields that are relevant to your use case.
- Custom mandatory fields can be set at the document level or applied universally to all document types.
- **Face detector improvements**
- We’ve made significant enhancements to our BlinkID face detector model. Now, the updated model detects instances where a finger is covering the face image more precisely, improving the reliability of the face detection feature.
- We made significant enhancements to our face detector model.
- **Added new values to `ClassInfo` enum:**
- `Region`:
- `ALAGOAS` for Brazilian documents
Expand Down
2 changes: 1 addition & 1 deletion builtFromCommit.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Built from commit 73e8ded11187d56e60a54ec25c4afb5265717808
Built from commit 842c8fa0a292e3adee9b1f096c6fd4c8e8805fbf
Loading

0 comments on commit b20a5c1

Please sign in to comment.