diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..afcc6ec --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,56 @@ +name: "Pr workflow" + +on: + pull_request: + types: [ opened, synchronize, edited, reopened ] + branches: + - master + +concurrency: + group: zebra-pr-${{ github.head_ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + env: + GRADLE_OPTS: -Dorg.gradle.workers.max=4 -Dorg.gradle.parallel=true -Dkotlin.compiler.execution.strategy=in-process" + + steps: + - name: "Check out code" + uses: actions/checkout@v4 + + - name: "Setup java" + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 17 + + - name: "Build BasicIntent1" + run: ./gradlew :BasicIntent1:app:assembleDebug :BasicIntent1:app:lintDebug + + - name: "Build DataCapture1" + run: ./gradlew :DataCapture1:app:assembleDebug :DataCapture1:app:lintDebug + + - name: "Build DocumentCaptureSample1" + run: ./gradlew :DocumentCaptureSample1:app:assembleDebug :DocumentCaptureSample1:app:lintDebug + + - name: "Build FreeFormOCRSample1" + run: ./gradlew :FreeFormOCRSample1:app:assembleDebug :FreeFormOCRSample1:app:lintDebug + + - name: "Build SignatureCapture1" + run: ./gradlew :SignatureCapture1:app:assembleDebug :SignatureCapture1:app:lintDebug + + - name: "Build SignatureCapture2" + run: ./gradlew :SignatureCapture2:app:assembleDebug :SignatureCapture2:app:lintDebug + + - name: "Build TruckLoadingDemo" + run: ./gradlew :TruckLoadingDemo:app:assembleDebug :TruckLoadingDemo:app:lintDebug + + - name: "Upload reports" + uses: actions/upload-artifact@v3 + if: failure() + with: + name: Reports + path: '**/build/reports/*' + retention-days: 2 \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/BasicIntent1/app/build.gradle b/BasicIntent1/app/build.gradle index 8c792a8..03ce64c 100755 --- a/BasicIntent1/app/build.gradle +++ b/BasicIntent1/app/build.gradle @@ -1,14 +1,15 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 28 + namespace = "com.zebra.basicintent1" + compileSdkVersion 34 + defaultConfig { applicationId "com.zebra.basicintent1" - minSdkVersion 16 - targetSdkVersion 28 + minSdkVersion 26 + targetSdkVersion 34 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { @@ -18,11 +19,14 @@ android { } } +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(17)) + } +} + dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' } diff --git a/BasicIntent1/app/src/main/AndroidManifest.xml b/BasicIntent1/app/src/main/AndroidManifest.xml index a96859a..7b2bb8f 100755 --- a/BasicIntent1/app/src/main/AndroidManifest.xml +++ b/BasicIntent1/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + - + - diff --git a/BasicIntent1/app/src/main/java/com/zebra/basicintent1/MainActivity.java b/BasicIntent1/app/src/main/java/com/zebra/basicintent1/MainActivity.java index ef1760d..7b954b5 100755 --- a/BasicIntent1/app/src/main/java/com/zebra/basicintent1/MainActivity.java +++ b/BasicIntent1/app/src/main/java/com/zebra/basicintent1/MainActivity.java @@ -11,10 +11,11 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.widget.TextView; + public class MainActivity extends AppCompatActivity { // diff --git a/BasicIntent1/app/src/main/res/layout/activity_main.xml b/BasicIntent1/app/src/main/res/layout/activity_main.xml index 4093cf8..45fc207 100755 --- a/BasicIntent1/app/src/main/res/layout/activity_main.xml +++ b/BasicIntent1/app/src/main/res/layout/activity_main.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/BasicIntent1/build.gradle b/BasicIntent1/build.gradle index da05f02..818b823 100644 --- a/BasicIntent1/build.gradle +++ b/BasicIntent1/build.gradle @@ -1,8 +1,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.2.0' apply false - id 'com.android.library' version '7.2.0' apply false - id 'org.jetbrains.kotlin.android' version '1.6.10' apply false + id 'com.android.application' version '8.1.2' apply false + id 'com.android.library' version '8.1.2' apply false + id 'org.jetbrains.kotlin.android' version '1.9.20' apply false } task clean(type: Delete) { diff --git a/BasicIntent1/gradle.properties b/BasicIntent1/gradle.properties index 743d692..7e6a54d 100755 --- a/BasicIntent1/gradle.properties +++ b/BasicIntent1/gradle.properties @@ -6,8 +6,23 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m +org.gradle.jvmargs=-Xmx1536m -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true + +org.gradle.caching=true +org.gradle.configureondemand=true +org.gradle.parallel=true + +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true + +org.gradle.configuration-cache=true +org.gradle.configuration-cache.max-problems=5 \ No newline at end of file diff --git a/BasicIntent1/gradle/wrapper/gradle-wrapper.properties b/BasicIntent1/gradle/wrapper/gradle-wrapper.properties index d7daa91..c55c464 100644 --- a/BasicIntent1/gradle/wrapper/gradle-wrapper.properties +++ b/BasicIntent1/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ #Wed Sep 14 16:29:45 EEST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip distributionPath=wrapper/dists +validateDistributionUrl=true zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/DataCapture1/app/build.gradle b/DataCapture1/app/build.gradle index 692eb07..7b9fdff 100755 --- a/DataCapture1/app/build.gradle +++ b/DataCapture1/app/build.gradle @@ -1,15 +1,15 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 25 - buildToolsVersion "25.0.2" + namespace = "com.zebra.datacapture1" + compileSdkVersion 34 + defaultConfig { applicationId "com.zebra.datacapture1" - minSdkVersion 23 - targetSdkVersion 25 + minSdkVersion 26 + targetSdkVersion 34 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { @@ -19,12 +19,13 @@ android { } } +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(17)) + } +} + dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - - androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { - exclude group: 'com.android.support', module: 'support-annotations' - }) - implementation'com.android.support:appcompat-v7:25.2.0' - testImplementation 'junit:junit:4.12' + implementation 'androidx.appcompat:appcompat:1.6.1' } diff --git a/DataCapture1/app/src/main/AndroidManifest.xml b/DataCapture1/app/src/main/AndroidManifest.xml index 84bac48..8f55a92 100755 --- a/DataCapture1/app/src/main/AndroidManifest.xml +++ b/DataCapture1/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + + android:name=".MainActivity" android:exported="true"> diff --git a/DataCapture1/app/src/main/java/com/zebra/datacapture1/MainActivity.java b/DataCapture1/app/src/main/java/com/zebra/datacapture1/MainActivity.java index fabd990..b9955e1 100755 --- a/DataCapture1/app/src/main/java/com/zebra/datacapture1/MainActivity.java +++ b/DataCapture1/app/src/main/java/com/zebra/datacapture1/MainActivity.java @@ -11,7 +11,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; @@ -26,6 +26,7 @@ import static android.provider.ContactsContract.Intents.Insert.ACTION; + public class MainActivity extends AppCompatActivity { // DataWedge Sample supporting DataWedge APIs up to DW 7.0 diff --git a/DataCapture1/build.gradle b/DataCapture1/build.gradle index da05f02..818b823 100644 --- a/DataCapture1/build.gradle +++ b/DataCapture1/build.gradle @@ -1,8 +1,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.2.0' apply false - id 'com.android.library' version '7.2.0' apply false - id 'org.jetbrains.kotlin.android' version '1.6.10' apply false + id 'com.android.application' version '8.1.2' apply false + id 'com.android.library' version '8.1.2' apply false + id 'org.jetbrains.kotlin.android' version '1.9.20' apply false } task clean(type: Delete) { diff --git a/DataCapture1/gradle.properties b/DataCapture1/gradle.properties index aac7c9b..eb9996d 100755 --- a/DataCapture1/gradle.properties +++ b/DataCapture1/gradle.properties @@ -9,9 +9,24 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m +org.gradle.jvmargs=-Xmx1536m -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true +org.gradle.caching=true +org.gradle.configureondemand=true +org.gradle.parallel=true + + +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true + +org.gradle.configuration-cache=true +org.gradle.configuration-cache.max-problems=5 \ No newline at end of file diff --git a/DataCapture1/gradle/wrapper/gradle-wrapper.properties b/DataCapture1/gradle/wrapper/gradle-wrapper.properties index d7daa91..c55c464 100644 --- a/DataCapture1/gradle/wrapper/gradle-wrapper.properties +++ b/DataCapture1/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ #Wed Sep 14 16:29:45 EEST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip distributionPath=wrapper/dists +validateDistributionUrl=true zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/DocumentCaptureSample1/app/build.gradle b/DocumentCaptureSample1/app/build.gradle index 663f688..41d65c6 100644 --- a/DocumentCaptureSample1/app/build.gradle +++ b/DocumentCaptureSample1/app/build.gradle @@ -1,12 +1,14 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 29 - buildToolsVersion "29.0.2" + namespace = "com.zebra.documentcapturesample1" + + compileSdkVersion 34 + defaultConfig { applicationId "com.zebra.documentcapturesample1" minSdkVersion 26 - targetSdkVersion 29 + targetSdkVersion 34 versionCode 1 versionName "1.0" } @@ -18,8 +20,14 @@ android { } } +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(17)) + } +} + dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' } diff --git a/DocumentCaptureSample1/app/src/main/AndroidManifest.xml b/DocumentCaptureSample1/app/src/main/AndroidManifest.xml index fd5cf76..b01abe6 100644 --- a/DocumentCaptureSample1/app/src/main/AndroidManifest.xml +++ b/DocumentCaptureSample1/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + - + diff --git a/DocumentCaptureSample1/app/src/main/java/com/zebra/documentcapturesample1/MainActivity.java b/DocumentCaptureSample1/app/src/main/java/com/zebra/documentcapturesample1/MainActivity.java index 4973004..56bc89d 100644 --- a/DocumentCaptureSample1/app/src/main/java/com/zebra/documentcapturesample1/MainActivity.java +++ b/DocumentCaptureSample1/app/src/main/java/com/zebra/documentcapturesample1/MainActivity.java @@ -328,9 +328,9 @@ private void processSingleDecode(Bundle data) cursor.moveToFirst(); String labelType = cursor - .getString(cursor.getColumnIndex(IntentKeys.LABEL_TYPE)); + .getString(cursor.getColumnIndexOrThrow(IntentKeys.LABEL_TYPE)); String dataString = cursor - .getString(cursor.getColumnIndex(IntentKeys.STRING_DATA_KEY_SINGLE_BARCODE)); + .getString(cursor.getColumnIndexOrThrow(IntentKeys.STRING_DATA_KEY_SINGLE_BARCODE)); barcodeData += "\nLabel type: " + labelType; barcodeData += "\nString data: " + dataString; @@ -381,18 +381,18 @@ private synchronized void processMultipleDecode(Bundle data) String labelType = ""; try { - labelType = cursor.getString(cursor.getColumnIndex(IntentKeys.FIELD_LABEL_TYPE)); + labelType = cursor.getString(cursor.getColumnIndexOrThrow(IntentKeys.FIELD_LABEL_TYPE)); } catch (Exception ex) { } strResultStatusData += "\nLabel type: " + labelType; if (labelType.equals(IntentKeys.LABEL_TYPE_SIGNATURE)) { - imgWidth = cursor.getInt(cursor.getColumnIndex(IntentKeys.IMAGE_WIDTH_TAG)); - imgHeight = cursor.getInt(cursor.getColumnIndex(IntentKeys.IMAGE_HEIGHT_TAG)); + imgWidth = cursor.getInt(cursor.getColumnIndexOrThrow(IntentKeys.IMAGE_WIDTH_TAG)); + imgHeight = cursor.getInt(cursor.getColumnIndexOrThrow(IntentKeys.IMAGE_HEIGHT_TAG)); // Checking if signature is present in the field [Start] try { int signature_status = -2; - signature_status = cursor.getInt(cursor.getColumnIndex(IntentKeys.COLUMN_SIGNATURE_STATUS)); + signature_status = cursor.getInt(cursor.getColumnIndexOrThrow(IntentKeys.COLUMN_SIGNATURE_STATUS)); if (signature_status == 1) { //Signature present strResultStatusData += "\nSignature status: Signature is present"; @@ -413,23 +413,23 @@ private synchronized void processMultipleDecode(Bundle data) strResultStatusData += "\nImage data: "; } else { String dataString = cursor - .getString(cursor.getColumnIndex(IntentKeys.DATA_STRING)); + .getString(cursor.getColumnIndexOrThrow(IntentKeys.DATA_STRING)); strResultStatusData += "\nString data: " + dataString; } - String nextURI = cursor.getString(cursor.getColumnIndex(IntentKeys.DATA_NEXT_URI)); + String nextURI = cursor.getString(cursor.getColumnIndexOrThrow(IntentKeys.DATA_NEXT_URI)); byte[] binaryData = null; if (nextURI.isEmpty()) { // No data chunks. All data are available in one chunk - binaryData = cursor.getBlob(cursor.getColumnIndex(IntentKeys.DECODE_DATA)); + binaryData = cursor.getBlob(cursor.getColumnIndexOrThrow(IntentKeys.DECODE_DATA)); } else { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); final String fullDataSize = cursor - .getString(cursor.getColumnIndex(IntentKeys.FULL_DATA_SIZE)); + .getString(cursor.getColumnIndexOrThrow(IntentKeys.FULL_DATA_SIZE)); int bufferSize = cursor.getInt(cursor - .getColumnIndex(IntentKeys.RAW_DATA_SIZE)); + .getColumnIndexOrThrow(IntentKeys.RAW_DATA_SIZE)); baos.write(cursor.getBlob(cursor - .getColumnIndex(IntentKeys.DECODE_DATA))); // Read the first chunk from initial set + .getColumnIndexOrThrow(IntentKeys.DECODE_DATA))); // Read the first chunk from initial set while (!nextURI.isEmpty()) { Cursor imageDataCursor = getContentResolver() .query(Uri.parse(nextURI), null, @@ -438,14 +438,14 @@ private synchronized void processMultipleDecode(Bundle data) imageDataCursor.moveToFirst(); bufferSize += imageDataCursor .getInt(imageDataCursor - .getColumnIndex(IntentKeys.RAW_DATA_SIZE)); + .getColumnIndexOrThrow(IntentKeys.RAW_DATA_SIZE)); byte[] bufferData = imageDataCursor .getBlob(imageDataCursor - .getColumnIndex(IntentKeys.DECODE_DATA)); + .getColumnIndexOrThrow(IntentKeys.DECODE_DATA)); baos.write(bufferData); nextURI = imageDataCursor .getString(imageDataCursor - .getColumnIndex(IntentKeys.DATA_NEXT_URI)); + .getColumnIndexOrThrow(IntentKeys.DATA_NEXT_URI)); } imageDataCursor.close(); diff --git a/DocumentCaptureSample1/app/src/main/res/layout/activity_main.xml b/DocumentCaptureSample1/app/src/main/res/layout/activity_main.xml index 13e860b..ceb0b82 100644 --- a/DocumentCaptureSample1/app/src/main/res/layout/activity_main.xml +++ b/DocumentCaptureSample1/app/src/main/res/layout/activity_main.xml @@ -8,6 +8,7 @@ tools:context=".MainActivity"> diff --git a/DocumentCaptureSample1/build.gradle b/DocumentCaptureSample1/build.gradle index da05f02..818b823 100644 --- a/DocumentCaptureSample1/build.gradle +++ b/DocumentCaptureSample1/build.gradle @@ -1,8 +1,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.2.0' apply false - id 'com.android.library' version '7.2.0' apply false - id 'org.jetbrains.kotlin.android' version '1.6.10' apply false + id 'com.android.application' version '8.1.2' apply false + id 'com.android.library' version '8.1.2' apply false + id 'org.jetbrains.kotlin.android' version '1.9.20' apply false } task clean(type: Delete) { diff --git a/DocumentCaptureSample1/gradle.properties b/DocumentCaptureSample1/gradle.properties index 55f37b3..74f5f67 100644 --- a/DocumentCaptureSample1/gradle.properties +++ b/DocumentCaptureSample1/gradle.properties @@ -1,20 +1,27 @@ -# Project-wide Gradle settings. -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app's APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true -# Automatically convert third-party libraries to use AndroidX -android.enableJetifier=true - +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx1536m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +org.gradle.caching=true +org.gradle.configureondemand=true +org.gradle.parallel=true + +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true + +org.gradle.configuration-cache=true +org.gradle.configuration-cache.max-problems=5 \ No newline at end of file diff --git a/DocumentCaptureSample1/gradle/wrapper/gradle-wrapper.properties b/DocumentCaptureSample1/gradle/wrapper/gradle-wrapper.properties index d7daa91..c55c464 100644 --- a/DocumentCaptureSample1/gradle/wrapper/gradle-wrapper.properties +++ b/DocumentCaptureSample1/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ #Wed Sep 14 16:29:45 EEST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip distributionPath=wrapper/dists +validateDistributionUrl=true zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/FreeFormOCRSample1/app/build.gradle b/FreeFormOCRSample1/app/build.gradle index 0391cc6..f91dd2c 100644 --- a/FreeFormOCRSample1/app/build.gradle +++ b/FreeFormOCRSample1/app/build.gradle @@ -4,16 +4,14 @@ plugins { android { namespace 'com.zebra.freeformocrsample1' - compileSdk 33 + compileSdkVersion 34 defaultConfig { applicationId "com.zebra.freeformocrsample1" - minSdk 30 - targetSdk 33 + minSdkVersion 26 + targetSdkVersion 34 versionCode 1 versionName "1.0" - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { @@ -22,18 +20,16 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 +} + +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(17)) } } dependencies { - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.9.0' + implementation 'com.google.android.material:material:1.10.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' } \ No newline at end of file diff --git a/FreeFormOCRSample1/app/src/androidTest/java/com/zebra/freeformocrsample1/ExampleInstrumentedTest.java b/FreeFormOCRSample1/app/src/androidTest/java/com/zebra/freeformocrsample1/ExampleInstrumentedTest.java deleted file mode 100644 index b009bb1..0000000 --- a/FreeFormOCRSample1/app/src/androidTest/java/com/zebra/freeformocrsample1/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.zebra.freeformocrsample1; - -import android.content.Context; - -import androidx.test.platform.app.InstrumentationRegistry; -import androidx.test.ext.junit.runners.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - assertEquals("com.zebra.freeformocrsample1", appContext.getPackageName()); - } -} \ No newline at end of file diff --git a/FreeFormOCRSample1/app/src/main/java/com/zebra/freeformocrsample1/MainActivity.java b/FreeFormOCRSample1/app/src/main/java/com/zebra/freeformocrsample1/MainActivity.java index a63729b..6ac4685 100644 --- a/FreeFormOCRSample1/app/src/main/java/com/zebra/freeformocrsample1/MainActivity.java +++ b/FreeFormOCRSample1/app/src/main/java/com/zebra/freeformocrsample1/MainActivity.java @@ -394,15 +394,15 @@ private synchronized void outputFreeFormOCRImageData(String uri, JSONObject json ByteArrayOutputStream baos = new ByteArrayOutputStream(); if (cursor != null) { cursor.moveToFirst(); - baos.write(cursor.getBlob(cursor.getColumnIndex(IntentKeys.RAW_DATA))); - String nextURI = cursor.getString(cursor.getColumnIndex(IntentKeys.DATA_NEXT_URI)); + baos.write(cursor.getBlob(cursor.getColumnIndexOrThrow(IntentKeys.RAW_DATA))); + String nextURI = cursor.getString(cursor.getColumnIndexOrThrow(IntentKeys.DATA_NEXT_URI)); while (nextURI != null && !nextURI.isEmpty()) { Cursor cursorNextData = getContentResolver().query(Uri.parse(nextURI), null, null, null); if (cursorNextData != null) { cursorNextData.moveToFirst(); - baos.write(cursorNextData.getBlob(cursorNextData.getColumnIndex(IntentKeys.RAW_DATA))); - nextURI = cursorNextData.getString(cursorNextData.getColumnIndex(IntentKeys.DATA_NEXT_URI)); + baos.write(cursorNextData.getBlob(cursorNextData.getColumnIndexOrThrow(IntentKeys.RAW_DATA))); + nextURI = cursorNextData.getString(cursorNextData.getColumnIndexOrThrow(IntentKeys.DATA_NEXT_URI)); cursorNextData.close(); diff --git a/FreeFormOCRSample1/build.gradle b/FreeFormOCRSample1/build.gradle index 90f9008..7d22d10 100644 --- a/FreeFormOCRSample1/build.gradle +++ b/FreeFormOCRSample1/build.gradle @@ -1,5 +1,5 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.3.0' apply false - id 'com.android.library' version '7.3.0' apply false + id 'com.android.application' version '8.1.2' apply false + id 'com.android.library' version '8.1.2' apply false } \ No newline at end of file diff --git a/FreeFormOCRSample1/gradle.properties b/FreeFormOCRSample1/gradle.properties index 3e927b1..7b4b0e9 100644 --- a/FreeFormOCRSample1/gradle.properties +++ b/FreeFormOCRSample1/gradle.properties @@ -10,7 +10,10 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true +org.gradle.caching=true +org.gradle.configureondemand=true +org.gradle.parallel=true + # AndroidX package structure to make it clearer which packages are bundled with the # Android operating system, and which are packaged with your app's APK # https://developer.android.com/topic/libraries/support-library/androidx-rn @@ -18,4 +21,7 @@ android.useAndroidX=true # Enables namespacing of each library's R class so that its R class includes only the # resources declared in the library itself and none from the library's dependencies, # thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file +android.nonTransitiveRClass=true + +org.gradle.configuration-cache=true +org.gradle.configuration-cache.max-problems=5 \ No newline at end of file diff --git a/SignatureCapture1/app/build.gradle b/SignatureCapture1/app/build.gradle index c709388..f5fa6be 100755 --- a/SignatureCapture1/app/build.gradle +++ b/SignatureCapture1/app/build.gradle @@ -1,14 +1,14 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 28 + namespace = 'com.zebra.signaturecapture' + compileSdkVersion 34 defaultConfig { applicationId "com.zebra.signaturecapture" - minSdkVersion 23 - targetSdkVersion 28 + minSdkVersion 26 + targetSdkVersion 34 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { @@ -18,11 +18,16 @@ android { } } +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(17)) + } +} + dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + implementation 'androidx.core:core:1.12.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.9.20")) } diff --git a/SignatureCapture1/app/src/main/AndroidManifest.xml b/SignatureCapture1/app/src/main/AndroidManifest.xml index 2870a63..045b367 100755 --- a/SignatureCapture1/app/src/main/AndroidManifest.xml +++ b/SignatureCapture1/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/SignatureCapture1/app/src/main/java/com/zebra/signaturecapture/MainActivity.java b/SignatureCapture1/app/src/main/java/com/zebra/signaturecapture/MainActivity.java index da7d6ce..e906373 100755 --- a/SignatureCapture1/app/src/main/java/com/zebra/signaturecapture/MainActivity.java +++ b/SignatureCapture1/app/src/main/java/com/zebra/signaturecapture/MainActivity.java @@ -25,10 +25,12 @@ import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Handler; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; + import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.view.Window; @@ -335,6 +337,7 @@ public void setConfiguration(View view){ @Override public void onNewIntent(Intent i) { + super.onNewIntent(i); final Intent intent = i; handleIntent(intent); } diff --git a/SignatureCapture1/app/src/main/res/layout/activity_intent_handler.xml b/SignatureCapture1/app/src/main/res/layout/activity_intent_handler.xml index cdeb615..3901e2a 100755 --- a/SignatureCapture1/app/src/main/res/layout/activity_intent_handler.xml +++ b/SignatureCapture1/app/src/main/res/layout/activity_intent_handler.xml @@ -1,9 +1,9 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/SignatureCapture1/build.gradle b/SignatureCapture1/build.gradle index da05f02..818b823 100644 --- a/SignatureCapture1/build.gradle +++ b/SignatureCapture1/build.gradle @@ -1,8 +1,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.2.0' apply false - id 'com.android.library' version '7.2.0' apply false - id 'org.jetbrains.kotlin.android' version '1.6.10' apply false + id 'com.android.application' version '8.1.2' apply false + id 'com.android.library' version '8.1.2' apply false + id 'org.jetbrains.kotlin.android' version '1.9.20' apply false } task clean(type: Delete) { diff --git a/SignatureCapture1/gradle.properties b/SignatureCapture1/gradle.properties index 743d692..74f5f67 100755 --- a/SignatureCapture1/gradle.properties +++ b/SignatureCapture1/gradle.properties @@ -6,8 +6,22 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m +org.gradle.jvmargs=-Xmx1536m -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true +org.gradle.caching=true +org.gradle.configureondemand=true +org.gradle.parallel=true + +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true + +org.gradle.configuration-cache=true +org.gradle.configuration-cache.max-problems=5 \ No newline at end of file diff --git a/SignatureCapture1/gradle/wrapper/gradle-wrapper.properties b/SignatureCapture1/gradle/wrapper/gradle-wrapper.properties index d7daa91..c55c464 100644 --- a/SignatureCapture1/gradle/wrapper/gradle-wrapper.properties +++ b/SignatureCapture1/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ #Wed Sep 14 16:29:45 EEST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip distributionPath=wrapper/dists +validateDistributionUrl=true zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/SignatureCapture2/app/build.gradle b/SignatureCapture2/app/build.gradle index 677881b..e9067ba 100644 --- a/SignatureCapture2/app/build.gradle +++ b/SignatureCapture2/app/build.gradle @@ -3,17 +3,16 @@ plugins { } android { - compileSdkVersion 30 - buildToolsVersion "30.0.3" + namespace = "com.zebra.signaturecapturesample2" + compileSdkVersion 34 defaultConfig { applicationId "com.zebra.signaturecapturesample2" minSdkVersion 26 - targetSdkVersion 30 + targetSdkVersion 34 versionCode 1 versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { @@ -22,18 +21,16 @@ android { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 +} + +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(17)) } } dependencies { - - implementation 'androidx.appcompat:appcompat:1.3.0' - implementation 'com.google.android.material:material:1.4.0' - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' - testImplementation 'junit:junit:4.+' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.10.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' } \ No newline at end of file diff --git a/SignatureCapture2/app/src/main/AndroidManifest.xml b/SignatureCapture2/app/src/main/AndroidManifest.xml index d913a34..5eb5805 100644 --- a/SignatureCapture2/app/src/main/AndroidManifest.xml +++ b/SignatureCapture2/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + @@ -12,7 +11,8 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme.SignatureCaptureSample2"> - + diff --git a/SignatureCapture2/app/src/main/java/com/zebra/signaturecapturesample2/MainActivity.java b/SignatureCapture2/app/src/main/java/com/zebra/signaturecapturesample2/MainActivity.java index 2710b7b..42fc0b8 100644 --- a/SignatureCapture2/app/src/main/java/com/zebra/signaturecapturesample2/MainActivity.java +++ b/SignatureCapture2/app/src/main/java/com/zebra/signaturecapturesample2/MainActivity.java @@ -258,11 +258,11 @@ private synchronized void processingDecodeData(Bundle data){ cursor.moveToFirst(); String barCodeData = ""; String labelType = data.getString(IntentKeys.LABEL_TYPE_TAG); - int imageFormat = Integer.parseInt(cursor.getString(cursor.getColumnIndex(IntentKeys.IMAGE_FORMAT)));//Get image format 1 - JPEG, 3 - BMP, 4 - TIFF, 5 - YUV + int imageFormat = Integer.parseInt(cursor.getString(cursor.getColumnIndexOrThrow(IntentKeys.IMAGE_FORMAT)));//Get image format 1 - JPEG, 3 - BMP, 4 - TIFF, 5 - YUV barCodeData += "\nLabel type: " + labelType; - barCodeData += "\nSignature : " + cursor.getString(cursor.getColumnIndex(IntentKeys.IMAGE_SIGNATURE_TYPE)); + barCodeData += "\nSignature : " + cursor.getString(cursor.getColumnIndexOrThrow(IntentKeys.IMAGE_SIGNATURE_TYPE)); barCodeData += "\nImage format : " + getImageFormat(imageFormat); //Getting image format - barCodeData += "\nImage Size : " + cursor.getString(cursor.getColumnIndex(IntentKeys.IMAGE_SIZE))+ " bytes"; + barCodeData += "\nImage Size : " + cursor.getString(cursor.getColumnIndexOrThrow(IntentKeys.IMAGE_SIZE))+ " bytes"; //Checking image format if(imageFormat != 4) @@ -274,24 +274,24 @@ private synchronized void processingDecodeData(Bundle data){ txtBarcodeData.setText(barCodeData); setUIForResult(txtBarcodeData, null); - String nextURI = cursor.getString(cursor.getColumnIndex(IntentKeys.IMAGE_NEXT_URI)); + String nextURI = cursor.getString(cursor.getColumnIndexOrThrow(IntentKeys.IMAGE_NEXT_URI)); byte[] binaryData = null; if (nextURI.isEmpty()) { //No data chunks. All data are available in one chunk - binaryData = cursor.getBlob(cursor.getColumnIndex(IntentKeys.IMAGE_DATA)); + binaryData = cursor.getBlob(cursor.getColumnIndexOrThrow(IntentKeys.IMAGE_DATA)); }else{ try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); - final String fullDataSize = cursor.getString(cursor.getColumnIndex(IntentKeys.IMAGE_FULL_DATA_SIZE)); - int bufferSize = cursor.getInt(cursor.getColumnIndex(IntentKeys.IMAGE_BUFFER)); - baos.write(cursor.getBlob(cursor.getColumnIndex(IntentKeys.IMAGE_DATA))); //Read the first chunk from initial set + final String fullDataSize = cursor.getString(cursor.getColumnIndexOrThrow(IntentKeys.IMAGE_FULL_DATA_SIZE)); + int bufferSize = cursor.getInt(cursor.getColumnIndexOrThrow(IntentKeys.IMAGE_BUFFER)); + baos.write(cursor.getBlob(cursor.getColumnIndexOrThrow(IntentKeys.IMAGE_DATA))); //Read the first chunk from initial set while (!nextURI.isEmpty()) { Cursor imageDataCursor = getContentResolver().query(Uri.parse(nextURI), null, null, null); if (imageDataCursor != null) { imageDataCursor.moveToFirst(); - bufferSize += imageDataCursor.getInt(imageDataCursor.getColumnIndex(IntentKeys.IMAGE_BUFFER)); - byte[] bufferData = imageDataCursor.getBlob(imageDataCursor.getColumnIndex(IntentKeys.IMAGE_DATA)); + bufferSize += imageDataCursor.getInt(imageDataCursor.getColumnIndexOrThrow(IntentKeys.IMAGE_BUFFER)); + byte[] bufferData = imageDataCursor.getBlob(imageDataCursor.getColumnIndexOrThrow(IntentKeys.IMAGE_DATA)); baos.write(bufferData); - nextURI = imageDataCursor.getString(imageDataCursor.getColumnIndex(IntentKeys.IMAGE_NEXT_URI)); + nextURI = imageDataCursor.getString(imageDataCursor.getColumnIndexOrThrow(IntentKeys.IMAGE_NEXT_URI)); } assert imageDataCursor != null; imageDataCursor.close(); diff --git a/SignatureCapture2/build.gradle b/SignatureCapture2/build.gradle index da05f02..818b823 100644 --- a/SignatureCapture2/build.gradle +++ b/SignatureCapture2/build.gradle @@ -1,8 +1,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { - id 'com.android.application' version '7.2.0' apply false - id 'com.android.library' version '7.2.0' apply false - id 'org.jetbrains.kotlin.android' version '1.6.10' apply false + id 'com.android.application' version '8.1.2' apply false + id 'com.android.library' version '8.1.2' apply false + id 'org.jetbrains.kotlin.android' version '1.9.20' apply false } task clean(type: Delete) { diff --git a/SignatureCapture2/gradle.properties b/SignatureCapture2/gradle.properties index fc45d2e..e4de97a 100644 --- a/SignatureCapture2/gradle.properties +++ b/SignatureCapture2/gradle.properties @@ -10,8 +10,18 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true +org.gradle.caching=true +org.gradle.configureondemand=true +org.gradle.parallel=true + # AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app"s APK +# Android operating system, and which are packaged with your app's APK # https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true \ No newline at end of file +android.useAndroidX=true +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true + +org.gradle.configuration-cache=true +org.gradle.configuration-cache.max-problems=5 \ No newline at end of file diff --git a/SignatureCapture2/gradle/wrapper/gradle-wrapper.properties b/SignatureCapture2/gradle/wrapper/gradle-wrapper.properties index d7daa91..c55c464 100644 --- a/SignatureCapture2/gradle/wrapper/gradle-wrapper.properties +++ b/SignatureCapture2/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ #Wed Sep 14 16:29:45 EEST 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip distributionPath=wrapper/dists +validateDistributionUrl=true zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/TruckLoadingDemo/app/build.gradle b/TruckLoadingDemo/app/build.gradle index 4dc13ca..4c3199c 100644 --- a/TruckLoadingDemo/app/build.gradle +++ b/TruckLoadingDemo/app/build.gradle @@ -1,17 +1,19 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 29 - buildToolsVersion "29.0.3" + namespace = "com.zebra.truckloadingdemo" + compileSdkVersion 34 + buildFeatures { + aidl = true + } defaultConfig { applicationId "com.zebra.truckloadingdemo" - minSdkVersion 27 - targetSdkVersion 29 + minSdkVersion 26 + targetSdkVersion 34 versionCode 1 versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { @@ -24,12 +26,15 @@ android { } +java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(17)) + } +} + dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.1.0' - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' - testImplementation 'junit:junit:4.12' - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' } diff --git a/TruckLoadingDemo/app/src/main/AndroidManifest.xml b/TruckLoadingDemo/app/src/main/AndroidManifest.xml index 9907158..3140447 100644 --- a/TruckLoadingDemo/app/src/main/AndroidManifest.xml +++ b/TruckLoadingDemo/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + - + - - - - - - + + + + + + \ No newline at end of file diff --git a/TruckLoadingDemo/app/src/main/res/layout/custom_message.xml b/TruckLoadingDemo/app/src/main/res/layout/custom_message.xml index 4d1d945..d3ff59f 100644 --- a/TruckLoadingDemo/app/src/main/res/layout/custom_message.xml +++ b/TruckLoadingDemo/app/src/main/res/layout/custom_message.xml @@ -53,6 +53,7 @@ diff --git a/TruckLoadingDemo/app/src/main/res/layout/scan_right_area.xml b/TruckLoadingDemo/app/src/main/res/layout/scan_right_area.xml index b810a7e..d9ddf3e 100644 --- a/TruckLoadingDemo/app/src/main/res/layout/scan_right_area.xml +++ b/TruckLoadingDemo/app/src/main/res/layout/scan_right_area.xml @@ -1,12 +1,13 @@ - \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..8064a67 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,7 @@ +includeBuild("BasicIntent1") +includeBuild("DataCapture1") +includeBuild("DocumentCaptureSample1") +includeBuild("FreeFormOCRSample1") +includeBuild("SignatureCapture1") +includeBuild("SignatureCapture2") +includeBuild("TruckLoadingDemo")