Skip to content

Commit

Permalink
Merge pull request #323 from BlinkID/jenkins/stable-build
Browse files Browse the repository at this point in the history
Jenkins/stable build
  • Loading branch information
medvedecrobertmb authored Apr 23, 2024
2 parents 5f350e0 + 4b4fdc8 commit d4146c2
Show file tree
Hide file tree
Showing 49 changed files with 1,458 additions and 1,196 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ protected BaseResultExtractorFactory createResultExtractorFactory() {

@Override
protected String getLicenceFilePath() {
return "com.microblink.blinkid.mblic";
return "com.microblink.blinkid.mblic";
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ private void extractMixedResults(BlinkIdMultiSideRecognizer.Result result) {
add(R.string.MBDocumentFrontImageFaceStatus, result.getFrontImageAnalysisResult().getFaceDetectionStatus().name());
add(R.string.MBDocumentFrontImageMrzStatus, result.getFrontImageAnalysisResult().getMrzDetectionStatus().name());
add(R.string.MBDocumentFrontImageBarcodeStatus, result.getFrontImageAnalysisResult().getBarcodeDetectionStatus().name());
add(R.string.MBDocumentFrontImageRealIDStatus, result.getFrontImageAnalysisResult().getRealIdDetectionStatus().name());
add(R.string.MBDocumentFrontImageCardOrientation, result.getFrontImageAnalysisResult().getCardOrientation().name());
add(R.string.MBDocumentFrontImageCardRotation, result.getFrontImageAnalysisResult().getCardRotation() != null ? result.getFrontImageAnalysisResult().getCardRotation().name() : "null");

Expand All @@ -210,6 +211,7 @@ private void extractMixedResults(BlinkIdMultiSideRecognizer.Result result) {
add(R.string.MBDocumentBackImageFaceStatus, result.getBackImageAnalysisResult().getFaceDetectionStatus().name());
add(R.string.MBDocumentBackImageMrzStatus, result.getBackImageAnalysisResult().getMrzDetectionStatus().name());
add(R.string.MBDocumentBackImageBarcodeStatus, result.getBackImageAnalysisResult().getBarcodeDetectionStatus().name());
add(R.string.MBDocumentBackImageRealIDStatus, result.getBackImageAnalysisResult().getRealIdDetectionStatus().name());
add(R.string.MBDocumentBackImageCardOrientation, result.getBackImageAnalysisResult().getCardOrientation().name());
add(R.string.MBDocumentBackImageCardRotation, result.getBackImageAnalysisResult().getCardRotation() != null ? result.getBackImageAnalysisResult().getCardRotation().name() : "null");

Expand Down Expand Up @@ -298,6 +300,7 @@ private void extractMixedNonEmptyResults(BlinkIdMultiSideRecognizer.Result resul
addIfNotEmpty(R.string.MBDocumentFrontImageFaceStatus, result.getFrontImageAnalysisResult().getFaceDetectionStatus().name());
addIfNotEmpty(R.string.MBDocumentFrontImageMrzStatus, result.getFrontImageAnalysisResult().getMrzDetectionStatus().name());
addIfNotEmpty(R.string.MBDocumentFrontImageBarcodeStatus, result.getFrontImageAnalysisResult().getBarcodeDetectionStatus().name());
addIfNotEmpty(R.string.MBDocumentFrontImageRealIDStatus, result.getFrontImageAnalysisResult().getRealIdDetectionStatus().name());
addIfNotEmpty(R.string.MBDocumentFrontImageCardOrientation, result.getFrontImageAnalysisResult().getCardOrientation().name());
addIfNotEmpty(R.string.MBDocumentFrontImageCardRotation, result.getFrontImageAnalysisResult().getCardRotation() != null ? result.getFrontImageAnalysisResult().getCardRotation().name() : "null");

Expand All @@ -307,6 +310,7 @@ private void extractMixedNonEmptyResults(BlinkIdMultiSideRecognizer.Result resul
addIfNotEmpty(R.string.MBDocumentBackImageFaceStatus, result.getBackImageAnalysisResult().getFaceDetectionStatus().name());
addIfNotEmpty(R.string.MBDocumentBackImageMrzStatus, result.getBackImageAnalysisResult().getMrzDetectionStatus().name());
addIfNotEmpty(R.string.MBDocumentBackImageBarcodeStatus, result.getBackImageAnalysisResult().getBarcodeDetectionStatus().name());
addIfNotEmpty(R.string.MBDocumentBackImageRealIDStatus, result.getBackImageAnalysisResult().getRealIdDetectionStatus().name());
addIfNotEmpty(R.string.MBDocumentBackImageCardOrientation, result.getBackImageAnalysisResult().getCardOrientation().name());
addIfNotEmpty(R.string.MBDocumentBackImageCardRotation, result.getBackImageAnalysisResult().getCardRotation() != null ? result.getBackImageAnalysisResult().getCardRotation().name() : "null");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ private void extractMixedResults(BlinkIdSingleSideRecognizer.Result result) {
add(R.string.MBDocumentImageFaceStatus, result.getImageAnalysisResult().getFaceDetectionStatus().name());
add(R.string.MBDocumentImageMrzStatus, result.getImageAnalysisResult().getMrzDetectionStatus().name());
add(R.string.MBDocumentImageBarcodeStatus, result.getImageAnalysisResult().getBarcodeDetectionStatus().name());
add(R.string.MBDocumentImageRealIDStatus, result.getImageAnalysisResult().getRealIdDetectionStatus().name());
add(R.string.MBDocumentImageCardOrientation, result.getImageAnalysisResult().getCardOrientation().name());
add(R.string.MBDocumentImageCardRotation, result.getImageAnalysisResult().getCardRotation() != null ? result.getImageAnalysisResult().getCardRotation().name() : "null");

Expand Down Expand Up @@ -267,6 +268,7 @@ private void extractMixedNonEmptyResults(BlinkIdSingleSideRecognizer.Result resu
addIfNotEmpty(R.string.MBDocumentImageFaceStatus, result.getImageAnalysisResult().getFaceDetectionStatus().name());
addIfNotEmpty(R.string.MBDocumentImageMrzStatus, result.getImageAnalysisResult().getMrzDetectionStatus().name());
addIfNotEmpty(R.string.MBDocumentImageBarcodeStatus, result.getImageAnalysisResult().getBarcodeDetectionStatus().name());
addIfNotEmpty(R.string.MBDocumentImageRealIDStatus, result.getImageAnalysisResult().getRealIdDetectionStatus().name());
addIfNotEmpty(R.string.MBDocumentImageCardOrientation, result.getImageAnalysisResult().getCardOrientation().name());
addIfNotEmpty(R.string.MBDocumentImageCardRotation, result.getImageAnalysisResult().getCardRotation() != null ? result.getImageAnalysisResult().getCardRotation().name() : "null");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,10 @@
<string name="MBDocumentFrontImageBarcodeStatus">Front image barcode detection status</string>
<string name="MBDocumentBackImageBarcodeStatus">Back image barcode detection status</string>

<string name="MBDocumentImageRealIDStatus">Real ID detection status</string>
<string name="MBDocumentFrontImageRealIDStatus">Front image Real ID detection status</string>
<string name="MBDocumentBackImageRealIDStatus">Back image Real ID detection status</string>

<string name="MBDocumentImageCardOrientation">Card orientation</string>
<string name="MBDocumentFrontImageCardOrientation">Front image card orientation</string>
<string name="MBDocumentBackImageCardOrientation">Back image card orientation</string>
Expand All @@ -364,20 +368,7 @@
<string name="MBFrontProcessingStatus">Front processing status</string>
<string name="MBBackProcessingStatus">Back processing status</string>
<string name="MBRecognitionMode">Recognition mode</string>
<string name="MBDocumentLivenessAnalysisStatus">Document liveness analysis status</string>
<string name="MBDocumentLivenessAnalysisScore">Document liveness analysis score</string>
<string name="MBDocumentVerificationConsistencyScore">Consistency score</string>
<string name="MBDocumentStaticSecurityFeatureAnalysisResultStatus">Static security feature analysis status</string>
<string name="MBDocumentStaticSecurityFeatureAnalysisResultScore">Static security feature analysis score</string>
<string name="MBDocumentStaticSecurityFeatureAnalysisResultFullImage">Static security feature analysis full image</string>
<string name="MBDocumentStaticSecurityFeatureAnalysisSegmentImage">Static security feature segment image</string>
<string name="MBDocumentStaticSecurityFeatureAnalysisSegmentRelativeBox">Static security feature segment relative box</string>
<string name="MBDocumentStaticSecurityFeatureAnalysisSegmentStatus">Static security feature segment verified</string>
<string name="MBVerificationTiltNeutralStepImage">Verification tilt neutral step image</string>
<string name="MBVerificationTiltLeftStepImage">Verification tilt left step image</string>
<string name="MBVerificationTiltRightStepImage">Verification tilt right step image</string>
<string name="MBVerificationTiltUpStepImage">Verification tilt up step image</string>
<string name="MBVerificationTiltDownStepImage">Verification tilt down step image</string>


<string name="MBDocumentLocation">Document location</string>
<string name="MBFaceLocation">Face location</string>
Expand Down
2 changes: 1 addition & 1 deletion BlinkIDSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ allprojects {
// versions of libraries that all modules require

project.ext {
blinkIdVersion = '6.6.1'
blinkIdVersion = '6.7.0'
compileSdkVersion = 34
targetSdkVersion = 34
appCompatVersion = '1.6.1'
Expand Down
Binary file modified LibBlinkID-javadoc.jar
Binary file not shown.
Binary file modified LibBlinkID.aar
Binary file not shown.
47 changes: 44 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Feeling ready to crack on with the integration? First make sure we support your
* [Reducing the final size of your app](#reduce-size)
* [Consequences of removing processor architecture](#arch-consequences)
* [Combining _BlinkID_ with other native libraries](#combineNativeLibraries)
* [Resolving conflict on `libc++_shared.so`](#dynamicCppRuntime)
* [Troubleshooting](#troubleshoot)
* [FAQ and known issues](#faq)
* [Additional info](#info)
Expand Down Expand Up @@ -114,7 +115,7 @@ Add _BlinkID_ as a dependency and make sure `transitive` is set to true

```
dependencies {
implementation('com.microblink:blinkid:6.6.1@aar') {
implementation('com.microblink:blinkid:6.7.0@aar') {
transitive = true
}
}
Expand All @@ -126,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.6.1` entry, right click on it and select `Library Properties...`
3. Locate `blinkid-6.7.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 @@ -1344,6 +1345,41 @@ You can also remove multiple processor architectures by specifying `exclude` dir
## <a name="combineNativeLibraries"></a> Combining _BlinkID_ with other native libraries
If you are combining _BlinkID_ library with other libraries that contain native code into your application, make sure you match the architectures of all native libraries. For example, if third party library has got only ARMv7 version, you must use exactly ARMv7 version of _BlinkID_ with that library, but not ARM64. Using this architectures will crash your app at initialization step because JVM will try to load all its native dependencies in same preferred architecture and will fail with `UnsatisfiedLinkError`.
### <a name="dynamicCppRuntime"></a> Resolving conflict on `libc++_shared.so`
_BlinkID_ contains native code that depends on the C++ runtime. This runtime is provided by the `libc++_shared.so`, which needs to be available in your app that is using _BlinkID_. However, the same file is also used by various other libraries that contain native components. If you happen to integrate both such library together with _BlinkID_ in your app, your build will fail with an error similar to this one:
```
* What went wrong:
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.7.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
```
The error states that multiple different dependencies provide the same file `lib/arm64/libc++_shared.so` (in this case, OpenCV and BlinkID).
You can resolve this issue by making sure that the dependency that uses _newer version of `libc++_shared.so`_ is listed first in your dependency list, and then, simply add the following to your `build.gradle`:
```
android {
packaging {
jniLibs {
pickFirsts.add("lib/armeabi-v7a/libc++_shared.so")
pickFirsts.add("lib/arm64-v8a/libc++_shared.so")
}
}
}
```
**IMPORTANT NOTE**
The code above will always select the first `libc++_shared.so` from your dependency list, so make sure that the dependency that uses the *latest version of `libc++_shared.so`* is listed first. This is because `libc++_shared.so` is backward-compatible, but not forward-compatible. This means that, e.g. `libBlinkID.so` built against `libc++_shared.so` from NDK r24 will work without problems when you package it together with `libc++_shared.so` from NDK r26, but will crash when you package it together with `libc++_shared.so` from NDK r21. This is true for all your native dependencies.
# <a name="troubleshoot"></a> Troubleshooting
### Integration difficulties
Expand Down Expand Up @@ -1400,7 +1436,11 @@ This usually happens when you perform integration into Eclipse project and you f

#### <a name="unsatisfied-link-error"></a> When my app starts, I get `UnsatisfiedLinkError`

This error happens when JVM fails to load some native method from native library If performing integration into Android studio and this error happens, make sure that you have correctly combined _BlinkID_ SDK with [third party SDKs that contain native code](#combine-native-libraries). If this error also happens in our integration sample apps, then it may indicate a bug in the SDK that is manifested on specific device. Please report that to our [support team](http://help.microblink.com).
This error happens when JVM fails to load some native method from native library If performing integration into Android studio and this error happens, make sure that you have correctly combined _BlinkID_ SDK with [third party SDKs that contain native code](#combineNativeLibraries), especially if you need resolving [conflict over `libc++_shared.so`](#dynamicCppRuntime). If this error also happens in our integration sample apps, then it may indicate a bug in the SDK that is manifested on specific device. Please report that to our [support team](http://help.microblink.com).

#### <a name="libcpp-shared-conflict"></a> During build, I get conflict about duplicate `libc++_shared.so`

Please consult the section about [resolving `libc++_shared.so` conflict](#dynamicCppRuntime).

#### <a name="late-metadata1"></a> I've added my callback to `MetadataCallbacks` object, but it is not being called
Expand Down Expand Up @@ -1430,6 +1470,7 @@ When automatic scanning of camera frames with our camera management is used (pro
Online trial licenses require a public network access for validation purposes. See [Licensing issues](#licensing-issues).
#### <a name="ocr-result-forbidden"></a> `onOcrResult()` method in my `OcrCallback` is never invoked and all `Result` objects always return `null` in their OCR result getters
In order to be able to obtain raw OCR result, which contains locations of each character, its value and its alternatives, you need to have a license that allows that. By default, licenses do not allow exposing raw OCR results in public API. If you really need that, please [contact us](https://help.microblink.com) and explain your use case.
Expand Down
27 changes: 26 additions & 1 deletion Release notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Release notes

## v6.7.0

### New Features
- **Real ID detection on US driver's license**
- BlinkID now includes the capability to identify Real ID symbols from US driver's licenses, providing users with immediate feedback on the presence or the absence of a Real ID symbol. This enhances user convenience and compliance with Real ID requirements, ensuring customers can quickly determine if a Real ID is available on a scanned US driver's license.
- **UX Improvements**
- Extended duration for UI messages
- UI messages now remain visible for a longer duration after scanning, improving user experience. Users can now review post-scanning messages at a comfortable pace, leading to a smoother process.
- Success indicator for front side capture
- BlinkID now displays a clear success indicator after scanning the front side of a document. This visual cue enhances user confidence by providing immediate feedback during the capturing process.
- **Partial anonymization of the `Document number`**
- To ensure user privacy and security, BlinkID now offers the option of partially anonymizing the document number from the scanned document.
- **Mandatory Barcode Presence on US documents**
- To minimize the cases of capturing the front side of the document as the back frame in the results, BlinkID now requires the presence of a barcode before saving the back frame on US documents. Processing status `BarcodeDetectionFailed` is returned when mandatory barcode is not present on the back of US documents.

### Minor API changes
- Added `BarcodeDetectionFailed` as a new `ProcessingStatus`
- This status is triggered once the barcode was not found on the image. This processing status can only occur if the document has mandatory barcode.
- Added new boolean member `realIdDetectionStatus` to the `ImageAnalysisResult`. If `true`, Real ID symbol is present, `false` otherwise.
- Added new member `documentNumberAnonymizationSettings` to the `ClassAnonymizationSettings` for seamless integration with the document number anonymization feature.

### Bugfixes
- Updated internal mapping for Myanmar passports to display nationality as "Myanmarese" instead of "Burmese" on Myanmar passports.
- `Date of Issue` marked optional on Peru ID offering users more flexibility in capturing ID information.
- `Date of Expiry` handling logic for MRZ improved in cases where documents with a date of expiry 1969 were not correctly sanitized.

## v6.6.1

- fixed URL of the server performing online license check when it's enabled
Expand Down Expand Up @@ -127,7 +153,6 @@
#### Bugfixes
- Fixed `Background ANR at jdk.internal.misc.Unsafe.park` that would happen in rare cases


## v6.5.1
- Improved scanning of Bolivia IDs by addressing cases where the expiration date is covered by a signature, allowing the completion of the scanning process.

Expand Down
Loading

0 comments on commit d4146c2

Please sign in to comment.