Skip to content

Commit

Permalink
Merge pull request #51 from PDF417/release/8.0.0
Browse files Browse the repository at this point in the history
Release/8.0.0
  • Loading branch information
i1E authored Apr 2, 2021
2 parents 50df375 + c46a658 commit 626097a
Show file tree
Hide file tree
Showing 431 changed files with 40,025 additions and 26,357 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
language: android
sudo: false
jdk:
- oraclejdk8
sudo: false
before_install:
- yes | sdkmanager "platforms;android-30"
android:
components:
- tools
- build-tools-28.0.3
- android-28
- build-tools-29.0.2
- android-30
- 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.
9 changes: 4 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.4.1'
classpath 'com.android.tools.build:gradle:4.1.2'
}
}

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

project.ext {
pdf417MobiVersion = '7.2.1'
compileSdkVersion = 28
targetSdkVersion = 28
buildToolsVersion = '28.0.3'
pdf417MobiVersion = '8.0.0'
compileSdkVersion = 30
targetSdkVersion = 30
}
1 change: 1 addition & 0 deletions Pdf417MobiSample/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
android.useAndroidX=true
4 changes: 2 additions & 2 deletions Pdf417MobiSample/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Mar 21 19:14:33 CET 2017
#Mon Mar 22 10:33:11 CET 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
24 changes: 0 additions & 24 deletions Pdf417MobiSample/pdf417MobiCustomUISample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
applicationId "com.microblink.barcode"
Expand All @@ -18,29 +17,6 @@ android {
signingConfig = debug.signingConfig
}
}

// to reduce the size of the final app, we recommend building 3 versions of your app, each
// built with single native architecture.
// If size is not problem, then it's easier to pack all architectures into a single apk.

/* productFlavors {
x86 {
ndk {
abiFilter "x86"
}
}
armv7 {
ndk {
abiFilter "armeabi-v7a"
}
}
arm {
ndk {
abiFilter "armeabi"
}
}
}
*/
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="mobi.pdf417.demo"
android:versionCode="8"
android:versionName="2.0" >
package="mobi.pdf417.demo">

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
Expand All @@ -20,6 +17,7 @@
android:name="mobi.pdf417.demo.CustomUIDemoApp"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:theme="@style/AppTheme"
android:label="@string/app_name" >
<activity
android:name=".MainActivity"
Expand All @@ -32,7 +30,7 @@
</intent-filter>
</activity>
<activity
android:name="com.microblink.activity.BarcodeScanActivity"
android:name="com.microblink.blinkbarcode.activity.BarcodeScanActivity"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
</activity>
<activity
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import android.app.Application;

import com.microblink.MicroblinkSDK;
import com.microblink.intent.IntentDataTransferMode;
import com.microblink.blinkbarcode.MicroblinkSDK;
import com.microblink.blinkbarcode.intent.IntentDataTransferMode;

public final class CustomUIDemoApp extends Application {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,36 @@
import android.graphics.Rect;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.NonNull;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toast;

import com.microblink.activity.BarcodeScanActivity;
import com.microblink.entities.recognizers.RecognizerBundle;
import com.microblink.geometry.Rectangle;
import com.microblink.hardware.SuccessCallback;
import com.microblink.hardware.orientation.Orientation;
import com.microblink.metadata.MetadataCallbacks;
import com.microblink.metadata.detection.FailedDetectionCallback;
import com.microblink.metadata.detection.points.DisplayablePointsDetection;
import com.microblink.metadata.detection.points.PointsDetectionCallback;
import com.microblink.metadata.detection.quad.DisplayableQuadDetection;
import com.microblink.metadata.detection.quad.QuadDetectionCallback;
import com.microblink.recognition.RecognitionSuccessType;
import com.microblink.util.CameraPermissionManager;
import com.microblink.view.CameraAspectMode;
import com.microblink.view.CameraEventsListener;
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;
import com.microblink.view.viewfinder.quadview.QuadViewManager;
import com.microblink.view.viewfinder.quadview.QuadViewManagerFactory;
import com.microblink.view.viewfinder.quadview.QuadViewPreset;
import com.microblink.blinkbarcode.activity.BarcodeScanActivity;
import com.microblink.blinkbarcode.entities.recognizers.RecognizerBundle;
import com.microblink.blinkbarcode.geometry.Rectangle;
import com.microblink.blinkbarcode.hardware.SuccessCallback;
import com.microblink.blinkbarcode.hardware.orientation.Orientation;
import com.microblink.blinkbarcode.metadata.MetadataCallbacks;
import com.microblink.blinkbarcode.metadata.detection.FailedDetectionCallback;
import com.microblink.blinkbarcode.metadata.detection.points.DisplayablePointsDetection;
import com.microblink.blinkbarcode.metadata.detection.points.PointsDetectionCallback;
import com.microblink.blinkbarcode.metadata.detection.quad.DisplayableQuadDetection;
import com.microblink.blinkbarcode.metadata.detection.quad.QuadDetectionCallback;
import com.microblink.blinkbarcode.recognition.RecognitionSuccessType;
import com.microblink.blinkbarcode.util.CameraPermissionManager;
import com.microblink.blinkbarcode.view.CameraAspectMode;
import com.microblink.blinkbarcode.view.CameraEventsListener;
import com.microblink.blinkbarcode.view.OrientationAllowedListener;
import com.microblink.blinkbarcode.view.exception.NonLandscapeOrientationNotSupportedException;
import com.microblink.blinkbarcode.view.recognition.RecognizerRunnerView;
import com.microblink.blinkbarcode.view.recognition.ScanResultListener;
import com.microblink.blinkbarcode.view.viewfinder.points.PointSetView;
import com.microblink.blinkbarcode.view.viewfinder.quadview.QuadViewManager;
import com.microblink.blinkbarcode.view.viewfinder.quadview.QuadViewManagerFactory;
import com.microblink.blinkbarcode.view.viewfinder.quadview.QuadViewPreset;

import androidx.annotation.NonNull;

@SuppressLint("InflateParams")
public class CustomUIScanActivity extends Activity implements View.OnClickListener {
Expand Down Expand Up @@ -314,6 +315,12 @@ public void run() {
}, 2000);
}
}

@Override
public void onUnrecoverableError(@NonNull Throwable throwable) {
Toast.makeText(CustomUIScanActivity.this, throwable.toString(), Toast.LENGTH_LONG).show();
finish();
}
};

private final CameraEventsListener mCameraEventsListener = new CameraEventsListener() {
Expand All @@ -340,7 +347,7 @@ public void onError(Throwable ex) {
// This method will be called when opening of camera resulted in exception or
// recognition process encountered an error.
// The error details will be given in ex parameter.
com.microblink.util.Log.e(this, ex, "Error");
com.microblink.blinkbarcode.util.Log.e(this, ex, "Error");
AlertDialog.Builder ab = new AlertDialog.Builder(CustomUIScanActivity.this);
ab.setMessage("There has been an error!")
.setTitle("Error")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,29 @@
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.WorkerThread;
import android.view.View;
import android.webkit.URLUtil;

import com.microblink.entities.recognizers.RecognizerBundle;
import com.microblink.entities.recognizers.blinkbarcode.barcode.BarcodeRecognizer;
import com.microblink.fragment.RecognizerRunnerFragment;
import com.microblink.fragment.overlay.BarcodeOverlayController;
import com.microblink.fragment.overlay.ScanningOverlay;
import com.microblink.geometry.Rectangle;
import com.microblink.recognition.RecognitionSuccessType;
import com.microblink.uisettings.ActivityRunner;
import com.microblink.uisettings.BarcodeUISettings;
import com.microblink.view.recognition.ScanResultListener;
import android.widget.Toast;

import com.microblink.blinkbarcode.entities.recognizers.RecognizerBundle;
import com.microblink.blinkbarcode.entities.recognizers.blinkbarcode.barcode.BarcodeRecognizer;
import com.microblink.blinkbarcode.fragment.RecognizerRunnerFragment;
import com.microblink.blinkbarcode.fragment.overlay.ScanningOverlay;
import com.microblink.blinkbarcode.fragment.overlay.basic.BasicOverlayController;
import com.microblink.blinkbarcode.geometry.Rectangle;
import com.microblink.blinkbarcode.recognition.RecognitionSuccessType;
import com.microblink.blinkbarcode.uisettings.ActivityRunner;
import com.microblink.blinkbarcode.uisettings.BarcodeUISettings;
import com.microblink.blinkbarcode.view.recognition.ScanResultListener;

import java.util.Arrays;

import androidx.annotation.NonNull;
import androidx.annotation.WorkerThread;
import androidx.appcompat.app.AppCompatActivity;

// ScanningOverlayBinder must be implemented for case when RecognizerRunnerFragment is used
public class MainActivity extends Activity implements RecognizerRunnerFragment.ScanningOverlayBinder {
public class MainActivity extends AppCompatActivity implements RecognizerRunnerFragment.ScanningOverlayBinder {

private static final int MY_REQUEST_CODE = 1337;

Expand All @@ -43,13 +46,13 @@ public class MainActivity extends Activity implements RecognizerRunnerFragment.S
private RecognizerRunnerFragment mRecognizerRunnerFragment;

/**
* BarcodeOverlayController displays same UI as BarcodeScanActivity, but over given RecognizerRunnerFragment.
* BasicOverlayController displays same UI as BarcodeScanActivity, but over given RecognizerRunnerFragment.
* Association is done via {@link #getScanningOverlay()} method in fragment's {@link RecognizerRunnerFragment#onAttach(Activity)}
* lifecycle event, so you must ensure that mScanOverlay exists at this time.
*/
private BarcodeOverlayController mScanOverlay = createRecognizerAndOverlay();
private BasicOverlayController mScanOverlay = createRecognizerAndOverlay();

private BarcodeOverlayController createRecognizerAndOverlay() {
private BasicOverlayController createRecognizerAndOverlay() {
// You have to enable recognizers and barcode types you want to support
// Don't enable what you don't need, it will significantly decrease scanning performance
mBarcodeRecognizer = new BarcodeRecognizer();
Expand All @@ -58,7 +61,8 @@ private BarcodeOverlayController createRecognizerAndOverlay() {

mRecognizerBundle = new RecognizerBundle(mBarcodeRecognizer);

return new BarcodeOverlayController(new BarcodeUISettings(mRecognizerBundle), new ScanResultListener() {
BarcodeUISettings uiSettings = new BarcodeUISettings(mRecognizerBundle);
return uiSettings.createOverlayController(this, new ScanResultListener() {
// called when RecognizerRunnerFragment finishes recognition
@Override
@WorkerThread
Expand All @@ -69,6 +73,12 @@ public void onScanningDone(@NonNull RecognitionSuccessType recognitionSuccessTyp
removeFragment();
handleScanResult();
}

@Override
public void onUnrecoverableError(@NonNull Throwable throwable) {
Toast.makeText(MainActivity.this, throwable.toString(), Toast.LENGTH_LONG).show();
finish();
}
});
}

Expand All @@ -78,7 +88,8 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);

if (savedInstanceState != null) {
mRecognizerRunnerFragment = (RecognizerRunnerFragment) getFragmentManager().findFragmentById(R.id.recognizer_runner_view_container);
mRecognizerRunnerFragment = (RecognizerRunnerFragment) getSupportFragmentManager()
.findFragmentById(R.id.recognizer_runner_view_container);
}
}

Expand Down Expand Up @@ -116,7 +127,7 @@ private void showScanFragment() {
scanLayout.setVisibility(View.VISIBLE);

mRecognizerRunnerFragment = new RecognizerRunnerFragment();
getFragmentManager().beginTransaction()
getSupportFragmentManager().beginTransaction()
.add(R.id.recognizer_runner_view_container, mRecognizerRunnerFragment)
.addToBackStack(null)
.commit();
Expand Down Expand Up @@ -161,6 +172,7 @@ private void startCustomUiActivityWithCustomScanRegion() {

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == MY_REQUEST_CODE && resultCode == RESULT_OK && data != null) {
// updates bundled recognizers with results that have arrived
mRecognizerBundle.loadFromIntent(data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
android:layout_height="match_parent"
tools:context="mobi.pdf417.demo.CustomUIScanActivity">

<com.microblink.view.recognition.RecognizerRunnerView
<com.microblink.blinkbarcode.view.recognition.RecognizerRunnerView
android:id="@+id/recognizer_runner_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
custom:mb_initialOrientation="portrait">
android:layout_height="match_parent">

</com.microblink.view.recognition.RecognizerRunnerView>
</com.microblink.blinkbarcode.view.recognition.RecognizerRunnerView>

</FrameLayout>

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
<resources>

<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<style name="AppTheme" parent="Theme.AppCompat">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>

Expand Down
1 change: 0 additions & 1 deletion Pdf417MobiSample/pdf417MobiDirectAPISample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId 'com.microblink.barcode'
minSdkVersion 16
Expand Down
Loading

0 comments on commit 626097a

Please sign in to comment.