Skip to content

Commit

Permalink
Merge pull request #47 from PDF417/release/v7.2.0
Browse files Browse the repository at this point in the history
Release/v7.2.0
  • Loading branch information
i1E authored May 17, 2019
2 parents ab7ceb2 + a01262e commit 3294c81
Show file tree
Hide file tree
Showing 133 changed files with 6,314 additions and 908 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ sudo: false
android:
components:
- tools
- build-tools-27.0.3
- android-26
- build-tools-28.0.3
- android-28
- extra-android-m2repository
script:
- cd Pdf417MobiSample
Expand Down
Binary file modified LibPdf417Mobi-javadoc.jar
Binary file not shown.
Binary file modified LibPdf417Mobi.aar
Binary file not shown.
10 changes: 5 additions & 5 deletions Pdf417MobiSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.android.tools.build:gradle:3.4.1'
}
}

Expand All @@ -23,8 +23,8 @@ allprojects {
// versions of libraries that all modules require

project.ext {
pdf417MobiVersion = '7.1.0'
compileSdkVersion = 26
targetSdkVersion = 26
buildToolsVersion = '27.0.3'
pdf417MobiVersion = '7.2.0'
compileSdkVersion = 28
targetSdkVersion = 28
buildToolsVersion = '28.0.3'
}
2 changes: 1 addition & 1 deletion Pdf417MobiSample/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
</activity>
<activity
android:name="com.microblink.activity.BarcodeScanActivity"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
android:screenOrientation="portrait">
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
</activity>
<activity
android:name=".CustomUIScanActivity"
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.microblink.geometry.Rectangle;
import com.microblink.hardware.SuccessCallback;
import com.microblink.hardware.orientation.Orientation;
import com.microblink.intent.IntentDataTransferMode;
import com.microblink.metadata.MetadataCallbacks;
import com.microblink.metadata.detection.FailedDetectionCallback;
import com.microblink.metadata.detection.points.DisplayablePointsDetection;
Expand All @@ -33,8 +32,8 @@
import com.microblink.util.CameraPermissionManager;
import com.microblink.view.CameraAspectMode;
import com.microblink.view.CameraEventsListener;
import com.microblink.view.NonLandscapeOrientationNotSupportedException;
import com.microblink.view.OrientationAllowedListener;
import com.microblink.view.exception.NonLandscapeOrientationNotSupportedException;
import com.microblink.view.recognition.RecognizerRunnerView;
import com.microblink.view.recognition.ScanResultListener;
import com.microblink.view.viewfinder.points.PointSetView;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
<activity
android:name="com.microblink.activity.BarcodeScanActivity"
tools:replace="android:theme"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
android:screenOrientation="portrait" >
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
</activity>
</application>

Expand Down
Binary file not shown.
49 changes: 26 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ For more information on how to integrate _PDF417.mobi_ SDK into your app read th
* [Using DirectAPI while RecognizerRunnerView is active](#directAPIWithRecognizer)
* [Handling processing events with `RecognizerRunner` and `RecognizerRunnerView`](#processingEvents)
* [Note about the `setMetadataCallbacks` method](#processingEventsImportantNote)
* [`Recogniezr` concept and `RecognizerBundle`](#availableRecognizers)
* [`Recognizer` concept and `RecognizerBundle`](#availableRecognizers)
* [The `Recognizer` concept](#recognizerConcept)
* [`RecognizerBundle`](#recognizerBundle)
* [Passing `Recognizer` objects between activities](#intentOptimization)
Expand Down Expand Up @@ -99,16 +99,16 @@ In your `build.gradle` you first need to add _PDF417.mobi_ maven repository to r

```
repositories {
maven { url 'http://maven.microblink.com' }
maven { url 'https://maven.microblink.com' }
}
```

After that, you just need to add _PDF417.mobi_ as a dependency to your application (make sure, `transitive` is set to true):

```
dependencies {
implementation('com.microblink:pdf417.mobi:7.1.0@aar') {
transitive = true
implementation('com.microblink:pdf417.mobi:7.2.0@aar') {
transitive = true
}
}
```
Expand All @@ -119,7 +119,7 @@ Android studio 3.0 should automatically import javadoc from maven dependency. If

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 `pdf417.mobi-7.1.0` entry, right click on it and select `Library Properties...`
3. Locate `pdf417.mobi-7.2.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 All @@ -137,7 +137,7 @@ Android studio 3.0 should automatically import javadoc from maven dependency. If
```
dependencies {
implementation project(':LibPdf417Mobi')
implementation "com.android.support:appcompat-v7:27.1.1"
implementation "com.android.support:appcompat-v7:28.0.0"
}
```
Expand Down Expand Up @@ -181,25 +181,27 @@ Open your `pom.xml` file and add these directives as appropriate:
```xml
<repositories>
<repository>
<id>MicroblinkRepo</id>
<url>http://maven.microblink.com</url>
<repository>
<id>MicroblinkRepo</id>
<url>https://maven.microblink.com</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.microblink</groupId>
<artifactId>pdf417.mobi</artifactId>
<version>7.1.0</version>
<type>aar</type>
</dependency>
<dependency>
<groupId>com.microblink</groupId>
<artifactId>pdf417.mobi</artifactId>
<version>7.2.0</version>
<type>aar</type>
</dependency>
</dependencies>
```
## <a name="quickScan"></a> Performing your first scan
1. Before starting a recognition process, you need to obtain a license from [Microblink dashboard](https://microblink.com/login). After registering, you will be able to generate a trial license for your app. License is bound to [package name](http://tools.android.com/tech-docs/new-build-system/applicationid-vs-packagename) of your app, so please make sure you enter the correct package name when asked.
1. First you'll need to create an account at [Microblink dashboard](https://microblink.com/login) where you can generate a demo license for your app. License is bound to [package name](http://tools.android.com/tech-docs/new-build-system/applicationid-vs-packagename) of your app, so please make sure you enter the correct package name when asked.

After creating a license, you will have the option to download the license as a file that you must place within your application's _assets_ folder. You must ensure that license key is set before instantiating any other classes from the SDK, otherwise you will get an exception at runtime. Therefore, we recommend that you extend [Android Application class](https://developer.android.com/reference/android/app/Application.html) and set the license in its [onCreate callback](https://developer.android.com/reference/android/app/Application.html#onCreate()) in the following way:
Download your licence file and put it in your application's _assets_ folder. Make sure to set the license key before using any other classes from the SDK, otherwise you will get a runtime exception.

We recommend that you extend [Android Application class](https://developer.android.com/reference/android/app/Application.html) and set the license in [onCreate callback](https://developer.android.com/reference/android/app/Application.html#onCreate()) like this:

```java
public class MyApplication extends Application {
Expand All @@ -210,7 +212,9 @@ Open your `pom.xml` file and add these directives as appropriate:
}
```

2. In your main activity, create recognizer objects that will perform image recognition, configure them and store them into [RecognizerBundle object](https://pdf417.github.io/pdf417-android/com/microblink/entities/recognizers/RecognizerBundle.html). You can see more information about available recognizers and about `RecognizerBundle` in chapter [RecognizerBundle and available recognizers](#availableRecognizers). For example, to scan PDF417 2D barcode, you can configure your recognizer object in the following way:
2. In your main activity, create recognizer objects that will perform image recognition, configure them and put them into [RecognizerBundle object](https://pdf417.github.io/pdf417-android/com/microblink/entities/recognizers/RecognizerBundle.html). You can see more information about available recognizers and `RecognizerBundle` [here](#availableRecognizers).

For example, to scan PDF417 2D barcode, configure your recognizer like this:

```java
public class MyActivity extends Activity {
Expand All @@ -232,7 +236,7 @@ Open your `pom.xml` file and add these directives as appropriate:
}
```

3. You can start recognition process by starting `BarcodeScanActivity` activity by creating `BarcodeUISettings` and calling [`ActivityRunner.startActivityForResult`](https://pdf417.github.io/pdf417-android/com/microblink/uisettings/ActivityRunner.html#startActivityForResult-android.app.Activity-int-com.microblink.uisettings.UISettings-) method:
3. Start recognition process by creating `BarcodeUISettings` and calling [`ActivityRunner.startActivityForResult`](https://pdf417.github.io/pdf417-android/com/microblink/uisettings/ActivityRunner.html#startActivityForResult-android.app.Activity-int-com.microblink.uisettings.UISettings-):

```java
// method within MyActivity from previous step
Expand All @@ -247,7 +251,7 @@ Open your `pom.xml` file and add these directives as appropriate:
}
```

4. After `BarcodeScanActivity` activity finishes the scan, it will return to the calling activity or fragment and will call its method `onActivityResult`. You can obtain the scanning results in that method.
4. `onActivityResult` will be called in your activity after scanning is finished, here you can get the scanning results.

```java
@Override
Expand All @@ -257,7 +261,6 @@ Open your `pom.xml` file and add these directives as appropriate:
if (requestCode == MY_REQUEST_CODE) {
if (resultCode == BarcodeScanActivity.RESULT_OK && data != null) {
// load the data into all recognizers bundled within your RecognizerBundle

mRecognizerBundle.loadFromIntent(data);

// now every recognizer object that was bundled within RecognizerBundle
Expand Down Expand Up @@ -783,7 +786,7 @@ Similarly, if you, for example, remove the `QuadDetectionCallback` from `Metadat
**Remember**, each time you make some changes to `MetadataCallbacks` object, you need to apply those changes to to your `RecognizerRunner` or `RecognizerRunnerView` by calling its `setMetadataCallbacks` method.
# <a name="availableRecognizers"></a> `Recogniezr` concept and `RecognizerBundle`
# <a name="availableRecognizers"></a> `Recognizer` concept and `RecognizerBundle`
This section will first describe [what is a `Recognizer`](#recognizerConcept) and how it should be used to perform recognition of the images, videos and camera stream. Next, [we will describe how `RecognizerBundle`](#recognizerBundle) can be used to tweak the recognition procedure and to transfer `Recognizer` objects between activities.
Expand Down Expand Up @@ -1105,7 +1108,7 @@ This usually happens when you use `Recognizer` that produces image or similar la
This usually happens when you attempt to transfer standalone `Result` that contains images or similar large objects via Intent and the size of the object exceeds Android intent transaction limit. Depending on the device, you will get either [TransactionTooLargeException](https://developer.android.com/reference/android/os/TransactionTooLargeException.html), a simple message `BINDER TRANSACTION FAILED` in log and your app will freeze or your app will get into restart loop. We recommend that you use `RecognizerBundle` and its API for sending `Recognizer` objects via Intent in a more safe manner ([check this section](#intentOptimization) for more information). However, if you really need to transfer standalone `Result` object (e.g. `Result` object obtained by cloning `Result` object owned by specific `Recognizer` object), you need to do that using global variables or singletons within your application. Sending large objects via Intent is not supported by Android.
# <a name="info"></a> Additional info
Complete API reference can be found in [Javadoc](https://pdf417.github.io/pdf417-android/index.html).
Complete API reference can be found in [Javadoc](https://pdf417.github.io/pdf417-android).
For any other questions, feel free to contact us at [help.microblink.com](http://help.microblink.com).
Expand Down
28 changes: 28 additions & 0 deletions Release notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Release notes

## 7.2.0

### New features:
- enabled capturing of high resolution camera frames:
- When custom UI integration is performed, enable this functionality by using method `RecognizerRunnerView.setHighResFrameCaptureEnabled` and use `RecognizerRunnerView.captureHighResImage` to capture image
- When using provided scan activities, high resolution full camera frames taken at the moment of successful scan are returned if this option is enabled through `UISettings`. Concrete `UISettings` which implement interface `HighResSuccessFrameCaptureUIOptions` support this feature.

### Improvements for existing features:
- added option to force overlay orientation for `BarcodeOverlayController` (`BarcodeScanActivity`) - use `BarcodeUISettings.setForcedOrientation(OverlayOrientation)`
- `RecognizerRunnerView` is lifecycle-aware now, it implements `android.arch.lifecycle.LifecycleObserver` interface
- `BarcodeScanActivity` by default does not show result dialog after scan
- updated default UI icons

### Minor API changes:
- Scanning timeout that can be configured by using `RecognizerBundle.setNumMsBeforeTimeout` is by default set to `RecognizerBundle.TIMEOUT_INFINITY`, which means that timeout is disabled by default. Previous default timeout value was 10 seconds.

### Bug fixes:
- fixed crashes on Nexus 6
- removed incorrect autofocus check that was performed before concrete camera type is chosen
- fixed crash on some devices when using `VIDEO_RESOLUTION_MAX_AVAILABLE`
- fixed problems in camera management:
- default camera surface is `TextureVeiw` for devices that use Camera1 API, otherwise `SurfaceView` is used
- fixed camera autofocus problems on Samsung S9/S9+ when optimisation for near scanning is enabled
- fixed bug which caused that results from the previous scan are cleared when the scan activity is run again and entities which have produced results are not used in the new scan
- various other bug fixes and improvements

## 7.1.0

### Bug fixes
- fixed crash that could happend when calling `reconfigureRecogizers` on `RecognizerRunnerView`

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 dc87b549e1904feb3430ae5ef847db3621be4f1e
Built from commit a415fc52387dc3817bb110d2446f33ccd7557979
Loading

0 comments on commit 3294c81

Please sign in to comment.