Skip to content

Commit 910435c

Browse files
authored
Merge pull request #34 from blinkinput/release/4.3.0
Release/4.3.0
2 parents 4a7d888 + 3567c3d commit 910435c

37 files changed

+1190
-310
lines changed

BlinkInputSample/BlinkInputFieldByFieldSample/src/main/java/com/microblink/input/CustomUIElementConfigurator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import com.microblink.entities.parsers.amount.AmountParser;
44
import com.microblink.entities.parsers.config.fieldbyfield.FieldByFieldElement;
55
import com.microblink.entities.parsers.date.DateParser;
6-
import com.microblink.entities.parsers.email.EMailParser;
6+
import com.microblink.entities.parsers.email.EmailParser;
77
import com.microblink.entities.parsers.raw.RawParser;
88

99
public class CustomUIElementConfigurator {
@@ -26,7 +26,7 @@ public static FieldByFieldElement[] createFieldByFieldElements() {
2626
return new FieldByFieldElement[] {
2727
new FieldByFieldElement(R.string.date_title, R.string.date_msg, new DateParser()),
2828
new FieldByFieldElement(R.string.large_amount_title, R.string.amount_msg, largeAmountParser),
29-
new FieldByFieldElement(R.string.email_title, R.string.email_msg, new EMailParser()),
29+
new FieldByFieldElement(R.string.email_title, R.string.email_msg, new EmailParser()),
3030
new FieldByFieldElement(R.string.raw_title, R.string.raw_msg, rawParser)
3131
};
3232
}

BlinkInputSample/BlinkInputTemplatingSample/src/main/java/com/microblink/util/templating/CroatianIDFrontSideTemplatingUtil.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ private void configureParsers() {
132132
.addCharToWhitelist('F', OcrFont.OCR_FONT_ANY)
133133
.addCharToWhitelist('Ž', OcrFont.OCR_FONT_ANY)
134134
.addCharToWhitelist('/', OcrFont.OCR_FONT_ANY);
135-
mSexParser.setMustEndWithWhitespace(true);
136-
mSexParser.setMustStartWithWhitespace(true);
135+
mSexParser.setEndWithWhitespace(true);
136+
mSexParser.setStartWithWhitespace(true);
137137

138138
//------------------------------------------------------------------------------------------
139139
// Citizenship parser
@@ -142,8 +142,8 @@ private void configureParsers() {
142142
// for parsing citizenship we will use regex parser configured with simple regular expression
143143
mCitizenshipParser = new RegexParser("[A-Z]{3}");
144144
CroatianIDRecognizerUtils.addAllCroatianUppercaseCharsToWhitelist((BlinkOCREngineOptions)mCitizenshipParser.getOcrEngineOptions());
145-
mCitizenshipParser.setMustEndWithWhitespace(true);
146-
mCitizenshipParser.setMustStartWithWhitespace(true);
145+
mCitizenshipParser.setEndWithWhitespace(true);
146+
mCitizenshipParser.setStartWithWhitespace(true);
147147

148148
//------------------------------------------------------------------------------------------
149149
// Document number parser
0 Bytes
Binary file not shown.

BlinkInputSample/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
google()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:3.6.1'
8+
classpath 'com.android.tools.build:gradle:3.6.3'
99
}
1010
}
1111

@@ -21,7 +21,7 @@ allprojects {
2121
// versions of libraries that all modules require
2222

2323
project.ext {
24-
blinkInputVersion = '4.2.0'
24+
blinkInputVersion = '4.3.0'
2525
compileSdkVersion = 29
2626
targetSdkVersion = 29
2727
appCompatVersion = '1.1.0'

LibBlinkInput-javadoc.jar

2.48 KB
Binary file not shown.

LibBlinkInput.aar

1.5 MB
Binary file not shown.

README.md

Lines changed: 18 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Add _BlinkInput_ as a dependency and make sure `transitive` is set to true
128128

129129
```
130130
dependencies {
131-
implementation('com.microblink:blinkinput:4.2.0@aar') {
131+
implementation('com.microblink:blinkinput:4.3.0@aar') {
132132
transitive = true
133133
}
134134
}
@@ -140,7 +140,7 @@ Android studio 3.0 should automatically import javadoc from maven dependency. If
140140

141141
1. In Android Studio project sidebar, ensure [project view is enabled](https://developer.android.com/sdk/installing/studio-androidview.html)
142142
2. Expand `External Libraries` entry (usually this is the last entry in project view)
143-
3. Locate `blinkinput-4.2.0` entry, right click on it and select `Library Properties...`
143+
3. Locate `blinkinput-4.3.0` entry, right click on it and select `Library Properties...`
144144
4. A `Library Properties` pop-up window will appear
145145
5. Click the second `+` button in bottom left corner of the window (the one that contains `+` with little globe)
146146
6. Window for defining documentation URL will appear
@@ -261,42 +261,15 @@ Camera video preview resolution also matters. In order to perform successful sca
261261

262262
### Processor architecture
263263

264-
_BlinkInput_ is distributed with **ARMv7**, **ARM64** and **x86** native library binaries.
264+
_BlinkInput_ is distributed with **ARMv7**, **ARM64**, **x86** and **x86_64** native library binaries.
265265

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

268-
Depending on the other application dependencies that you use, there are two cases to consider:
269-
270-
#### 1) _BlinkInput_ is the single native library in the application
271-
272-
Google decided that as of August 2019 all apps on Google Play that contain native code need to have native support for 64-bit processors (this includes ARM64 and x86_64).
273-
274-
This means that you cannot upload application to Google Play Console that supports only 32-bit ABI and does not support corresponding 64-bit ABI.
275-
276-
To be able to upload your application which depends on _BlinkInput_, you have to exclude x86 native code from _BlinkInput_.
277-
278-
In the `build.gradle` file from your application module, you can do it in this way:
279-
280-
```
281-
android {
282-
defaultConfig {
283-
ndk {
284-
// Tells Gradle to package the following ABIs into your application
285-
abiFilters 'armeabi-v7a', 'arm64-v8a'
286-
}
287-
}
288-
}
289-
```
290-
291-
#### 2) There are other native libraries in the application
268+
Even before setting the license key, you should check if the _BlinkInput_ is supported on the current device (see next section: *Compatibility check*). Attempting to call any method from the SDK that relies on native code, such as license check, on a device with unsupported CPU architecture will crash your app.
292269

293270
If you are combining _BlinkInput_ library with other libraries that contain native code into your application, make sure you match the architectures of all native libraries.
294271

295-
For example, if a third party library has got only ARMv7 and ARM64 versions, you must use exactly ARMv7 and ARM64 versions of _BlinkInput_ with that library, but not x86. Using these architectures will crash your app at the initialization step because JVM will try to load all its native dependencies in the same preferred architecture and will fail with UnsatisfiedLinkError.
296-
297-
On the other hand, if a third party library supports more ABI versions than _BlinkInput_, for example, ARMv7, ARM64, x86 and **x86_64**, on devices with preferred ABI x86_64, you cannot use _BlinkInput_.
298-
299-
Even before setting the license key, you should check if the _BlinkInput_ is supported on the current device (see next section: *Compatibility check*). Attempting to call any method from the SDK that relies on native code, such as license check, on a device with unsupported CPU architecture will crash your app. You should disable _BlinkInput_ features on x86_64 devices.
272+
For example, if a third party library has got only ARMv7 and ARM64 versions, you must use exactly ARMv7 and ARM64 versions of _BlinkInput_ with that library, but not x86. Using these architectures will crash your app at the initialization step because JVM will try to load all its native dependencies in the same preferred architecture and will fail with `UnsatisfiedLinkError`.
300273

301274
For more information, see [Processor architecture considerations](#archConsider) section.
302275

@@ -1138,13 +1111,13 @@ This problem is usually solved with transitive Maven dependencies, i.e. when pub
11381111

11391112
# <a name="archConsider"></a> Processor architecture considerations
11401113

1141-
_BlinkInput_ is distributed with **ARMv7**, **ARM64** and **x86** native library binaries.
1114+
_BlinkInput_ is distributed with **ARMv7**, **ARM64**, **x86** and **x86_64** native library binaries.
11421115

11431116
**ARMv7** architecture gives the ability to take advantage of hardware accelerated floating point operations and SIMD processing with [NEON](http://www.arm.com/products/processors/technologies/neon.php). This gives _BlinkInput_ a huge performance boost on devices that have ARMv7 processors. Most new devices (all since 2012.) have ARMv7 processor so it makes little sense not to take advantage of performance boosts that those processors can give. Also note that some devices with ARMv7 processors do not support NEON instruction sets, most popular being those based on [NVIDIA Tegra 2](https://en.wikipedia.org/wiki/Tegra#Tegra_2). Since these devices are old by today's standard, _BlinkInput_ does not support them. For the same reason, _BlinkInput_ does not support devices with ARMv5 (`armeabi`) architecture.
11441117

11451118
**ARM64** is the new processor architecture that most new devices use. ARM64 processors are very powerful and also have the possibility to take advantage of new NEON64 SIMD instruction set to quickly process multiple pixels with a single instruction.
11461119

1147-
**x86** and **x86_64** architectures are used on very few devices today, most of them are manufactured before 2015., like [Asus Zenfone 4](http://www.gsmarena.com/asus_zenfone_4-5951.php) and they take about 1% of all devices, according to the Device catalog on Google Play Console. Some x86 and x86_64 devices have ARM emulator, but running the _BlinkInput_ on the emulator will give a huge performance penalty. _BlinkInput_ contains x86 native library mostly to support emulators, while it does not support x86_64 ABI.
1120+
**x86** and **x86_64** architectures are used on very few devices today, most of them are manufactured before 2015, like [Asus Zenfone 4](http://www.gsmarena.com/asus_zenfone_4-5951.php) and they take about 1% of all devices, according to the Device catalog on Google Play Console. Some x86 and x86_64 devices have ARM emulator, but running the _BlinkInput_ on the emulator will give a huge performance penalty.
11481121

11491122
There are some issues to be considered:
11501123

@@ -1158,7 +1131,7 @@ There are some issues to be considered:
11581131
- x86_64 processors understand x86 instruction set, but x86 processors do not understand x86_64 instruction set
11591132
- if x86_64 processor executes x86 code, it does not take advantage of 64-bit registers and use two instructions instead of one for 64-bit operations
11601133

1161-
`LibBlinkInput.aar` archive contains ARMv7, ARM64 and x86 builds of the native library. By default, when you integrate _BlinkInput_ into your app, your app will contain native builds for all these processor architectures. Thus, _BlinkInput_ will work on ARMv7, ARM64 and x86 devices and will use ARMv7 features on ARMv7 devices and ARM64 features on ARM64 devices. However, the size of your application will be rather large.
1134+
`LibBlinkInput.aar` archive contains ARMv7, ARM64, x86 and x86_64 builds of the native library. By default, when you integrate _BlinkInput_ into your app, your app will contain native builds for all these processor architectures. Thus, _BlinkInput_ will work on ARMv7, ARM64, x86 and x86_64 devices and will use ARMv7 features on ARMv7 devices and ARM64 features on ARM64 devices. However, the size of your application will be rather large.
11621135

11631136
## <a name="reduceSize"></a> Reducing the final size of your app
11641137

@@ -1175,7 +1148,7 @@ android {
11751148
abi {
11761149
enable true
11771150
reset()
1178-
include 'x86', 'armeabi-v7a', 'arm64-v8a'
1151+
include 'x86', 'armeabi-v7a', 'arm64-v8a', 'x86_64'
11791152
universalApk true
11801153
}
11811154
}
@@ -1186,7 +1159,7 @@ With that build instructions, gradle will build four different APK files for you
11861159

11871160
```
11881161
// map for the version code
1189-
def abiVersionCodes = ['armeabi-v7a':1, 'arm64-v8a':2, 'x86':3]
1162+
def abiVersionCodes = ['armeabi-v7a':1, 'arm64-v8a':2, 'x86':3, 'x86_64':4]
11901163

11911164
import com.android.build.OutputFile
11921165

@@ -1205,7 +1178,7 @@ For more information about creating APK splits with gradle, check [this article
12051178

12061179
After generating multiple APK's, you need to upload them to Google Play. For tutorial and rules about uploading multiple APK's to Google Play, please read the [official Google article about multiple APKs](https://developer.android.com/google/play/publishing/multiple-apks.html).
12071180

1208-
### Removing processor architecture support in gradle without using APK splits
1181+
### Removing processor architecture support
12091182

12101183
If you won't be distributing your app via Google Play or for some other reasons want to have single APK of smaller size, you can completely remove support for certain CPU architecture from your APK. **This is not recommended due to [consequences](#archConsequences)**.
12111184
@@ -1240,15 +1213,19 @@ where `<ABI>` represents the CPU architecture you want to remove:
12401213
- to remove x86 support, use `exclude 'lib/x86/libBlinkInput.so'`
12411214
- to remove ARM64 support, use `exclude 'lib/arm64-v8a/libBlinkInput.so'`
12421215
- **NOTE**: this is **not recommended**. See [this notice](#64bitNotice).
1216+
- to remove x86_64 support, use `exclude 'lib/x86_64/libBlinkInput.so'`
12431217
12441218
You can also remove multiple processor architectures by specifying `exclude` directive multiple times. Just bear in mind that removing processor architecture will have side effects on performance and stability of your app. Please read [this](#archConsequences) for more information.
12451219
12461220
### <a name="archConsequences"></a> Consequences of removing processor architecture
12471221
1248-
- by removing ARMv7 support, _BlinkInput_ will not work on devices that have ARMv7 processors.
1249-
- by removing ARM64 support, _BlinkInput_ will not use ARM64 features on ARM64 device
1222+
- Google decided that as of August 2019 all apps on Google Play that contain native code need to have native support for 64-bit processors (this includes ARM64 and x86_64). This means that you cannot upload application to Google Play Console that supports only 32-bit ABI and does not support corresponding 64-bit ABI.
1223+
1224+
- By removing ARMv7 support, _BlinkInput_ will not work on devices that have ARMv7 processors.
1225+
- By removing ARM64 support, _BlinkInput_ will not use ARM64 features on ARM64 device
12501226
- also, some future devices may ship with ARM64 processors that will not support ARMv7 instruction set. Please see [this note](#64bitNotice) for more information.
1251-
- by removing x86 support, _BlinkInput_ will not work on devices that have x86 processor, except in situations when devices have ARM emulator - in that case, _BlinkInput_ will work, but will be slow and possibly unstable
1227+
- By removing x86 support, _BlinkInput_ will not work on devices that have x86 processor, except in situations when devices have ARM emulator - in that case, _BlinkInput_ will work, but will be slow and possibly unstable
1228+
- By removing x86_64 support, _BlinkInput_ will not use 64-bit optimizations on x86_64 processor, but if x86 support is not removed, _BlinkInput_ should work
12521229
12531230
12541231
## <a name="combineNativeLibraries"></a> Combining _BlinkInput_ with other native libraries

Release notes.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Release notes
22

3+
## v4.3.0
4+
### Breaking change:
5+
6+
Based on the feedback, we have restored support for **x86_64** processor architecture. Due to the architecture specifics, there is no guarantee that the scanning process will work equally well as it does on the ARM architectures. The main reason for restoring support is to ease the compliance issue for developers.
7+
We distribute SDK with **ARMv7**, **ARM64**, **x86**, and **x86_64** native library binaries.
8+
9+
### Improvements:
10+
11+
- We have translated complete SDK to following languages: **Croatian**, **Czech**, **English**, **French**, **German**, **Italian**, **Portuguese**, **Slovak**, and **Spanish**.
12+
- We improved document detection with `DocumentCaptureRecognizer`.
13+
- We are now delivering the complete list of open source dependencies used in the SDK. Please check the `open-source-software-used` directory.
14+
15+
### Minor API changes:
16+
17+
- We removed `RecognizerRunnerView` custom attributes: `mb_initialOrientation` and `mb_aspectMode`. Use `RecognizerRunnerView.setInitialOrientation` and `RecognizerRunnerView.setAspectMode` to configure the attributes in the code.
18+
- We renamed `EMailParser` to `EmailParser`
19+
- We renamed some methods:
20+
- `LicensePlatesParser`: `getLicensePlateString` to `getLicensePlate`
21+
- `RegexParser`: `isUsingSieve` to `shouldUseSieve`, `setMustStartWithWhitespace ` to `setStartWithWhitespace `, `isMustStartWithWhitespace ` to `shouldStartWithWhitespace `, `setMustEndWithWhitespace ` to `setEndWithWhitespace `, `isMustEndWithWhitespace ` to `shouldEndWithWhitespace `
22+
- `RawParser`: `isUsingSieve` to `shouldUseSieve`
23+
324
## 4.2.0
425

526
### Breaking changes:

builtFromCommit.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Built from commit 09fbad1c1ffbd4fd169f8ccd1bcdc92284172214
1+
Built from commit c699892f1516732c7137646005912aee5f0b5d09

docs/allclasses-frame.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ <h1 class="bar">All&nbsp;Classes</h1>
5454
<li><a href="com/microblink/entities/parsers/date/DateParser.html" title="class in com.microblink.entities.parsers.date" target="classFrame">DateParser</a></li>
5555
<li><a href="com/microblink/entities/parsers/date/DateParser.Result.html" title="class in com.microblink.entities.parsers.date" target="classFrame">DateParser.Result</a></li>
5656
<li><a href="com/microblink/results/date/DateResult.html" title="class in com.microblink.results.date" target="classFrame">DateResult</a></li>
57+
<li><a href="com/microblink/results/date/DateUtils.html" title="class in com.microblink.results.date" target="classFrame">DateUtils</a></li>
5758
<li><a href="com/microblink/metadata/image/DebugImageCallback.html" title="interface in com.microblink.metadata.image" target="classFrame"><span class="interfaceName">DebugImageCallback</span></a></li>
5859
<li><a href="com/microblink/image/DebugImageListener.html" title="interface in com.microblink.image" target="classFrame"><span class="interfaceName">DebugImageListener</span></a></li>
5960
<li><a href="com/microblink/uisettings/options/DebugImageListenerUIOptions.html" title="interface in com.microblink.uisettings.options" target="classFrame"><span class="interfaceName">DebugImageListenerUIOptions</span></a></li>
@@ -97,8 +98,8 @@ <h1 class="bar">All&nbsp;Classes</h1>
9798
<li><a href="com/microblink/entities/detectors/quad/document/DocumentSpecificationPreset.html" title="class in com.microblink.entities.detectors.quad.document" target="classFrame">DocumentSpecificationPreset</a></li>
9899
<li><a href="com/microblink/entities/recognizers/templating/dewarpPolicies/DPIBasedDewarpPolicy.html" title="class in com.microblink.entities.recognizers.templating.dewarpPolicies" target="classFrame">DPIBasedDewarpPolicy</a></li>
99100
<li><a href="com/microblink/entities/recognizers/blinkid/imageoptions/dpi/DpiOptionsUtils.html" title="class in com.microblink.entities.recognizers.blinkid.imageoptions.dpi" target="classFrame">DpiOptionsUtils</a></li>
100-
<li><a href="com/microblink/entities/parsers/email/EMailParser.html" title="class in com.microblink.entities.parsers.email" target="classFrame">EMailParser</a></li>
101-
<li><a href="com/microblink/entities/parsers/email/EMailParser.Result.html" title="class in com.microblink.entities.parsers.email" target="classFrame">EMailParser.Result</a></li>
101+
<li><a href="com/microblink/entities/parsers/email/EmailParser.html" title="class in com.microblink.entities.parsers.email" target="classFrame">EmailParser</a></li>
102+
<li><a href="com/microblink/entities/parsers/email/EmailParser.Result.html" title="class in com.microblink.entities.parsers.email" target="classFrame">EmailParser.Result</a></li>
102103
<li><a href="com/microblink/entities/recognizers/blinkid/imageresult/EncodedFullDocumentImageResult.html" title="interface in com.microblink.entities.recognizers.blinkid.imageresult" target="classFrame"><span class="interfaceName">EncodedFullDocumentImageResult</span></a></li>
103104
<li><a href="com/microblink/entities/recognizers/blinkid/imageoptions/encode/EncodeFullDocumentImagesOptions.html" title="interface in com.microblink.entities.recognizers.blinkid.imageoptions.encode" target="classFrame"><span class="interfaceName">EncodeFullDocumentImagesOptions</span></a></li>
104105
<li><a href="com/microblink/entities/Entity.html" title="class in com.microblink.entities" target="classFrame">Entity</a></li>

0 commit comments

Comments
 (0)