Skip to content

Commit

Permalink
Merge pull request #34 from blinkcard/release/2.9.0
Browse files Browse the repository at this point in the history
Release/2.9.0
  • Loading branch information
i1E authored Jan 18, 2024
2 parents 3db5e4a + e3b151b commit 55468fe
Show file tree
Hide file tree
Showing 412 changed files with 49,427 additions and 128,964 deletions.
10 changes: 8 additions & 2 deletions BlinkCardSample/BlinkCard-SimpleIntegration/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
compileSdkVersion = rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.microblink.blinkcard"
minSdkVersion 16
minSdkVersion 21
targetSdkVersion rootProject.ext.targetSdkVersion
}
buildTypes {
Expand All @@ -25,6 +25,12 @@ android {
universalApk true
}
}
namespace 'com.microblink.blinkcard'
packagingOptions {
jniLibs {
useLegacyPackaging false
}
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.microblink.blinkcard">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.CAMERA" />

Expand All @@ -16,7 +15,6 @@
<application
android:name=".BlinkCardSampleApp"
android:allowBackup="false"
android:extractNativeLibs="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.AppTheme.FullScreen">
Expand Down
Binary file not shown.
7 changes: 3 additions & 4 deletions BlinkCardSample/LibUtils/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
compileSdkVersion = rootProject.ext.compileSdkVersion

defaultConfig {
minSdkVersion 16
minSdkVersion 21
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
buildTypes {
debug {
Expand All @@ -23,6 +21,7 @@ android {
matchingFallbacks = ['release']
}
}
namespace 'com.microblink.blinkcard.libutils'
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions BlinkCardSample/LibUtils/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest package="com.microblink.blinkcard.libutils"
xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application>
<activity android:name="com.microblink.blinkcard.help.HelpActivity"/>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ public enum ResultSource {
FRONT,
BACK,
MRZ,
BARCODE

BARCODE,
LOCATIONS
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ public void onAttach(Context context) {


@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
public View onCreateView(LayoutInflater inflater, final ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_results, container, false);
mListView = view.findViewById(R.id.list_view);
if (getActivity() != null) {
ClipboardManager clipboard = (ClipboardManager)
final ClipboardManager clipboard = (ClipboardManager)
getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.microblink.blinkcard.result.extract;

import android.content.Context;
import android.graphics.Bitmap;

import com.microblink.blinkcard.entities.recognizers.Recognizer;
import com.microblink.blinkcard.image.Image;
Expand Down Expand Up @@ -46,6 +47,9 @@ protected void onDataExtractionDone(ResultType result, ResultSource resultSource
protected void extractData(ResultType result, ResultSource resultSource) {
extractData(result);
}
protected void extractData(ResultType result, ResultSource resultSource, String jsonResult) {
extractData(result);
}

protected void add(int key, String value) {
mExtractedData.add(mBuilder.build(key, value));
Expand Down Expand Up @@ -95,5 +99,9 @@ protected void add(int key, Image image) {
mExtractedData.add(mBuilder.build(key, image));
}

protected void add(int key, Bitmap bitmap) {
mExtractedData.add(mBuilder.build(key, bitmap));
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,13 @@ public RecognitionResultEntry build(@StringRes int key, Image value) {
return new RecognitionResultEntry(createKey(key), ImageUtils.transformImage(value));
}
}

public RecognitionResultEntry build(@StringRes int key, Bitmap value) {
if ( value == null ) {
return build( key, "" );
} else {
return new RecognitionResultEntry(createKey(key), value);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
package com.microblink.blinkcard.result.extract.blinkcard;

import com.microblink.blinkcard.entities.recognizers.blinkcard.BlinkCardRecognizer;
import com.microblink.blinkcard.entities.recognizers.blinkcard.legacy.LegacyBlinkCardEliteRecognizer;
import com.microblink.blinkcard.entities.recognizers.blinkcard.legacy.LegacyBlinkCardRecognizer;
import com.microblink.blinkcard.result.extract.BaseResultExtractorFactory;

public class BlinkCardResultExtractorFactory extends BaseResultExtractorFactory {
@Override
protected void addExtractors() {
add(BlinkCardRecognizer.class,
new BlinkCardRecognizerResultExtractor());
add(LegacyBlinkCardRecognizer.class,
new LegacyBlinkCardRecognitionResultExtractor());
add(LegacyBlinkCardEliteRecognizer.class,
new LegacyBlinkCardEliteRecognitionResultExtractor());
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<string name="PPDeposit">Deposit</string>
<string name="PPWithdraw">Withdrawal</string>
<string name="PPDueDate">Due date</string>
<string name="PPLastDateOfTheStandingOrder">Last date of the standing order</string>
<string name="PPPaymentStatus">Payment status</string>
<string name="PPPaymentSituationId">Payment situation ID</string>
<string name="PPPayerAccount">Payer account</string>
Expand Down Expand Up @@ -218,8 +219,10 @@
<string name="PPRecipientInternalId">Recipient internal ID</string>
<string name="PPLoyaltyID">Loyalty ID</string>
<string name="PPNavVerificationCode">NAV verification code</string>
<string name="PPURL">URL</string>
<string name="PPLicenceNumber">Licence Number</string>
<string name="PPLicenceType">Licence Type</string>
<string name="PPEffectiveDate">Effective date</string>
<string name="PPLicenceCategories">Licence Categories</string>
<string name="PPVehicleCategories">Vehicle Categories</string>
<string name="PPVehicleClass">Vehicle Class</string>
Expand Down Expand Up @@ -276,6 +279,8 @@
<string name="PPPostingKey">Posting key</string>
<string name="PPRestrictions">Restrictions</string>
<string name="PPEndorsements">Endorsements</string>
<string name="PPConditions">Conditions</string>
<string name="PPVehicleClassInfo">Vehicle class info</string>
<string name="PPRank">Rank</string>
<string name="PPClassInfoCountry">Country</string>
<string name="PPClassInfoRegion">Region</string>
Expand Down Expand Up @@ -304,6 +309,8 @@
<string name="MBEncodedFullDocumentImageSecondSide">Encoded full document image second side</string>
<string name="MBMRZImage">MRZ image</string>
<string name="MBFaceImage">Face image</string>
<string name="PPFaceImageSide">Face image side</string>
<string name="PPFaceImageLocation">Face image location</string>
<string name="MBEncodedFaceImage">Encoded face image</string>
<string name="MBSignatureImage">Signature image</string>
<string name="MBEncodedSignatureImage">Encoded signature image</string>
Expand All @@ -312,6 +319,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="MBJsonResult">JSON result</string>

<string name="MBDocumentImageColorStatus">Image color status</string>
<string name="MBDocumentFrontImageColorStatus">Front image color status</string>
Expand All @@ -337,6 +345,10 @@
<string name="MBDocumentFrontImageCardOrientation">Front image card orientation</string>
<string name="MBDocumentBackImageCardOrientation">Back image card orientation</string>

<string name="MBDocumentImageCardRotation">Card rotation</string>
<string name="MBDocumentFrontImageCardRotation">Front image card rotation</string>
<string name="MBDocumentBackImageCardRotation">Back image card rotation</string>

<string name="MBDocumentImageBlurred">Image blurred</string>
<string name="MBDocumentFrontImageBlurred">Front image blurred</string>
<string name="MBDocumentBackImageBlurred">Back image blurred</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<string name="raw_title">Raw text</string>
<string name="raw_msg">Position text in this frame</string>

<string name="regex_title">Regex text</string>
<string name="regex_msg">[2–9]|[12]\d|3[0–6] contains an integer in the range 2..36 inclusive</string>

<string name="payment_description_title">Payment description</string>
<string name="payment_description_msg">Position payment description in this frame</string>

Expand Down
1 change: 1 addition & 0 deletions BlinkCardSample/LibUtils/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
<item>Back side OCR</item>
<item>MRZ</item>
<item>Barcode</item>
<item>Locations</item>
</string-array>
</resources>
13 changes: 7 additions & 6 deletions BlinkCardSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath 'com.android.tools.build:gradle:8.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -15,8 +16,8 @@ buildscript {

allprojects {
repositories {
mavenCentral()
google()
jcenter()
maven { url 'https://maven.microblink.com' }
// mavenLocal()
}
Expand All @@ -29,8 +30,8 @@ task clean(type: Delete) {
// versions of libraries that all modules require

project.ext {
blinkCardVersion = '2.8.1'
compileSdkVersion = 31
targetSdkVersion = 31
appCompatVersion = '1.2.0'
blinkCardVersion = '2.9.0'
compileSdkVersion = 34
targetSdkVersion = 34
appCompatVersion = '1.6.1'
}
1 change: 1 addition & 0 deletions BlinkCardSample/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
android.defaults.buildfeatures.buildconfig=true
android.enableJetifier=true
android.useAndroidX=true

2 changes: 1 addition & 1 deletion BlinkCardSample/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Binary file modified LibBlinkCard.aar
Binary file not shown.
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The package contains Android Archive (AAR) that contains everything you need to

The source code of all sample apps is given to you to show you how to perform integration of _BlinkCard_ SDK into your app. You can use this source code and all resources as you wish. You can use sample apps as a basis for creating your own app, or you can copy/paste the code and/or resources from sample apps into your app and use them as you wish without even asking us for permission.

_BlinkCard_ is supported on Android SDK version 16 (Android 4.1) or later.
_BlinkCard_ is supported on Android SDK version 21 (Android 5.0) or later.

The list of all provided scan activities can be found in the [Built-in activities and overlays](#built-in-ui-components) section.

Expand Down Expand Up @@ -92,19 +92,19 @@ Add _BlinkCard_ as a dependency and make sure `transitive` is set to true

```
dependencies {
implementation('com.microblink:blinkcard:2.8.1@aar') {
implementation('com.microblink:blinkcard:2.9.0@aar') {
transitive = true
}
}
```

#### Importing Javadoc

Android studio 3.0 should automatically import javadoc from maven dependency. If that doesn't happen, you can do that manually by following these steps:
Android studio should automatically import javadoc from maven dependency. If that doesn't happen, you can do that manually by following these steps:

1. In Android Studio project sidebar, ensure [project view is enabled](https://developer.android.com/sdk/installing/studio-androidview.html)
2. Expand `External Libraries` entry (usually this is the last entry in project view)
3. Locate `blinkcard-2.8.1` entry, right click on it and select `Library Properties...`
3. Locate `blinkcard-2.9.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 @@ -198,15 +198,15 @@ Android studio 3.0 should automatically import javadoc from maven dependency. If

### Android Version

_BlinkCard_ requires Android API level **16** or newer. For best performance and compatibility, we recommend at least Android 5.0.
_BlinkCard_ requires Android API level **21** or newer.

### Camera

Camera video preview resolution also matters. In order to perform successful scans, camera preview resolution must be at least 720p. Note that camera preview resolution is not the same as video recording resolution.

### Processor architecture

_BlinkCard_ is distributed with **ARMv7** and **ARM64** native library binaries. The support for **x86** and **x86_64** has been removed in _BlinkCard v2.7.0_.
_BlinkCard_ is distributed with **ARMv7** and **ARM64** native library binaries.

_BlinkCard_ is a native library, written in C++ and available for multiple platforms. Because of this, _BlinkCard_ cannot work on devices with obscure hardware architectures. We have compiled _BlinkCard_ native code only for the most popular Android [ABIs](https://en.wikipedia.org/wiki/Application_binary_interface).

Expand Down Expand Up @@ -923,12 +923,6 @@ The [`BlinkCardRecognizer`](https://blinkcard.github.io/blinkcard-android/com/mi
`BlinkCardRecognizer` is a Combined recognizer, which means it's designed for scanning **both sides of a card**. However, if all required data is found on the first side, we do not wait for second side scanning. We can return the result early. A set of required fields is defined through the recognizer's settings.
"Front side" and "back side" are terms more suited to ID scanning. We start the scanning process with the **side containing the card number**. This makes the UX easier for users with cards where all data is on the back side.
### <a name="legacy_blink_card_recognizer"></a> LegacyBlinkCardRecognizer (deprecated)
The [`LegacyBlinkCardRecognizer`](https://blinkcard.github.io/blinkcard-android/com/microblink/blinkcard/entities/recognizers/blinkcard/legacy/LegacyBlinkCardRecognizer.html) scans back side of Payment / Debit card after scanning the front side and combines data from both sides.
### <a name="legacy_blink_card_elite_recognizer"></a> LegacyBlinkCardEliteRecognizer (deprecated)
The [`LegacyBlinkCardEliteRecognizer`](https://blinkcard.github.io/blinkcard-android/com/microblink/blinkcard/entities/recognizers/blinkcard/legacy/LegacyBlinkCardEliteRecognizer.html) scans back side of elite Payment / Debit card after scanning the front side and combines data from both sides.
# <a name="embed-aar"></a> Embedding _BlinkCard_ inside another SDK
You need to ensure that the final app gets all resources required by _BlinkCard_. At the time of writing this documentation, [Android does not have support for combining multiple AAR libraries into single fat AAR](https://stackoverflow.com/questions/20700581/android-studio-how-to-package-single-aar-from-multiple-library-projects/20715155#20715155). The problem is that resource merging is done while building application, not while building AAR, so application must be aware of all its dependencies. **There is no official Android way of "hiding" third party AAR within your AAR.**
Expand Down
Loading

0 comments on commit 55468fe

Please sign in to comment.