Skip to content

Commit

Permalink
Merge pull request #38 from blinkcard/jenkins/stable-build
Browse files Browse the repository at this point in the history
Jenkins/stable build
  • Loading branch information
medvedecrobertmb authored Apr 9, 2024
2 parents 9605ee5 + 8046334 commit fbf41f6
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 7 deletions.
2 changes: 1 addition & 1 deletion BlinkCardSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ task clean(type: Delete) {
// versions of libraries that all modules require

project.ext {
blinkCardVersion = '2.9.2'
blinkCardVersion = '2.9.3'
compileSdkVersion = 34
targetSdkVersion = 34
appCompatVersion = '1.6.1'
Expand Down
Binary file modified LibBlinkCard-javadoc.jar
Binary file not shown.
Binary file modified LibBlinkCard.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 @@ -44,6 +44,7 @@ To see _BlinkCard_ in action, check our [demo app](https://play.google.com/store
* [Reducing the final size of your app](#reduce-size)
* [Consequences of removing processor architecture](#arch-consequences)
* [Combining _BlinkCard_ 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 @@ -90,7 +91,7 @@ Add _BlinkCard_ as a dependency and make sure `transitive` is set to true

```
dependencies {
implementation('com.microblink:blinkcard:2.9.2@aar') {
implementation('com.microblink:blinkcard:2.9.3@aar') {
transitive = true
}
}
Expand All @@ -102,7 +103,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 `blinkcard-2.9.2` entry, right click on it and select `Library Properties...`
3. Locate `blinkcard-2.9.3` 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 @@ -1109,6 +1110,41 @@ You can also remove multiple processor architectures by specifying `exclude` dir
## <a name="combineNativeLibraries"></a> Combining _BlinkCard_ with other native libraries
If you are combining _BlinkCard_ 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 _BlinkCard_ 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`
_BlinkCard_ 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 _BlinkCard_. 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 _BlinkCard_ 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-blinkcard-2.9.3/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 BlinkCard).
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. `libBlinkCard.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 @@ -1165,7 +1201,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 _BlinkCard_ 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 _BlinkCard_ 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 @@ -1195,6 +1235,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
7 changes: 6 additions & 1 deletion Release notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release notes

## 2.9.3

### Bug fixes

- fixed Ping server URL error when using `proguard-android-optimize.txt` default proguard file

## 2.9.2

### Bug fixes
Expand All @@ -12,7 +18,6 @@
- Add option to change Ping URL for Ping proxy feature through `MicroblinkSDK.setPingProxyUrl()`
- minor improvements in the default UI w.r.t. accessibility


## 2.9.1

### Minor API changes
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 4e66e3962f24d6827a686267591bded65bbb3ea3
Built from commit 4fe3b6d97fbf1e69c4b129dd95e3a52ed07a17bd
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.microblink</groupId>
<artifactId>blinkcard</artifactId>
<version>2.9.2</version>
<version>2.9.3</version>
<packaging>aar</packaging>
<name>BlinkCard SDK for Android</name>
<description>SDK that enables scanning of credit or payment cards in your Android application</description>
Expand Down

0 comments on commit fbf41f6

Please sign in to comment.