From 720db6f9030dbc9d182a216599ecd54d07e708cf Mon Sep 17 00:00:00 2001 From: Gerhard Date: Tue, 11 Feb 2020 13:22:39 +0100 Subject: [PATCH 1/6] updated version; fixed bug: barcode sometimes not shown when scannign meter --- example/RNExampleApp/android/build.gradle | 2 +- plugin/android/build.gradle | 4 ++-- .../main/java/com/anyline/reactnative/Anyline4Activity.java | 2 ++ .../java/com/anyline/reactnative/AnylinePluginHelper.java | 6 +++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/example/RNExampleApp/android/build.gradle b/example/RNExampleApp/android/build.gradle index 614eb496..50628a9c 100644 --- a/example/RNExampleApp/android/build.gradle +++ b/example/RNExampleApp/android/build.gradle @@ -33,7 +33,7 @@ allprojects { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } - maven { url 'https://anylinesdk.blob.core.windows.net/maven/' } + maven { url 'https://anylinesdk.blob.core.windows.net/testing/' } google() jcenter() flatDir { diff --git a/plugin/android/build.gradle b/plugin/android/build.gradle index b7764c6d..dfad5b86 100755 --- a/plugin/android/build.gradle +++ b/plugin/android/build.gradle @@ -55,13 +55,13 @@ repositories { dirs 'libs' } maven { - url 'https://anylinesdk.blob.core.windows.net/maven/' + url 'https://anylinesdk.blob.core.windows.net/testing/' } } dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) - implementation 'io.anyline:anylinesdk:18@aar' + implementation 'io.anyline:anylinesdk:18-RC3@aar' implementation 'com.google.firebase:firebase-ml-vision:19.0.2' implementation 'com.google.firebase:firebase-ml-vision-face-model:17.0.2' diff --git a/plugin/android/src/main/java/com/anyline/reactnative/Anyline4Activity.java b/plugin/android/src/main/java/com/anyline/reactnative/Anyline4Activity.java index 1faebc3b..6aa10baf 100644 --- a/plugin/android/src/main/java/com/anyline/reactnative/Anyline4Activity.java +++ b/plugin/android/src/main/java/com/anyline/reactnative/Anyline4Activity.java @@ -242,6 +242,7 @@ public void onResult(ScanResult result) { jsonMeterResult = AnylinePluginHelper.jsonHelper(Anyline4Activity.this, subResult, jsonMeterResult); jsonResult.put(subResult.getPluginId(), jsonMeterResult); + AnylinePluginHelper.clearFinalBarcodeList(); // otherwise result from previous scan could be shown if new scan does not include barcode } catch (Exception e) { Log.e(TAG, "EXCEPTION", e); @@ -427,6 +428,7 @@ public void onResult(MeterScanResult meterScanResult) { } setResult(scanViewPlugin, jsonResult); + AnylinePluginHelper.clearFinalBarcodeList(); // otherwise result from previous scan could be shown if new scan does not include barcode } }); } diff --git a/plugin/android/src/main/java/com/anyline/reactnative/AnylinePluginHelper.java b/plugin/android/src/main/java/com/anyline/reactnative/AnylinePluginHelper.java index feb66e1c..85e35378 100644 --- a/plugin/android/src/main/java/com/anyline/reactnative/AnylinePluginHelper.java +++ b/plugin/android/src/main/java/com/anyline/reactnative/AnylinePluginHelper.java @@ -120,6 +120,10 @@ public static boolean getNativeBarcodeMode() { return nativeBarcodeEnabled; } + public static void clearFinalBarcodeList() { + finalBarcodeList=null; + } + public static JSONArray arrayOfDetectedBarcodes() { if (nativeBarcodeEnabled) { @@ -261,7 +265,7 @@ public static void enableNativeBarcode(ScanView anylineScanView, final List Date: Tue, 11 Feb 2020 18:03:05 +0100 Subject: [PATCH 2/6] Updated TIN config --- example/RNExampleApp/config/TINConfig.js | 89 ++++++++++++------------ 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/example/RNExampleApp/config/TINConfig.js b/example/RNExampleApp/config/TINConfig.js index f5e01ba8..9ebb1c12 100644 --- a/example/RNExampleApp/config/TINConfig.js +++ b/example/RNExampleApp/config/TINConfig.js @@ -15,47 +15,50 @@ export default { 'NE9tUzVraWdNUVZLaW8vaWlJS2tIVEVUdUxjYWJEWWtacExZdVR2YnU1S1hIc0R6\n' + 'b1NxUUJTL3ZFS3VYUHhhCjNnanZnS285M3lrSjJKQjVBZjZiSkE9PQo=', options: { - - "camera": { - "captureResolution": "720" - }, - "flash": { - "mode": "manual", - "alignment": "bottom_left" - }, - "viewPlugin": { - "plugin": { - "id": "TIN_ID", - "ocrPlugin": { - "tinConfig": { - - } - } - }, - "cutoutConfig": { - "style": "rect", - "alignment": "top_half", - "strokeWidth": 1, - "strokeColor": "FFFFFF", - "cornerRadius": 2, - "outerColor": "000000", - "outerAlpha": 0.3, - "feedbackStrokeColor": "0099FF" - }, - "scanFeedback": { - "animation": "traverse_multi", - "animationDuration": 250, - "style": "contour_rect", - "strokeWidth": 2, - "strokeColor": "0099FF", - "beepOnResult": false, - "vibrateOnResult": true, - "blinkAnimationOnResult": true, - "cancelOnResult": true - }, - "cancelOnResult": true, - "reportingEnabled": true - } - } - + "camera": { + "captureResolution": "720p" + }, + "flash": { + "mode": "manual", + "alignment": "bottom_right", + "imageOn": "flash_on", + "imageOff": "flash_off" + }, + "viewPlugin" : { + "plugin": { + "id": "TIN", + "ocrPlugin": { + "tinConfig":{ + } + } + }, + "cutoutConfig" : { + "style": "rect", + "width": 720, + "alignment": "center", + "maxWidthPercent": "80%", + "ratioFromSize": { + "width": 720, + "height": 144 + }, + "outerColor": "000000", + "outerAlpha": 0.3, + "strokeWidth": 2, + "strokeColor": "FFFFFF", + "cornerRadius": 2, + "feedbackStrokeColor": "0099FF" + }, + "scanFeedback" : { + "animation": "traverse_multi", + "animationDuration" : 250, + "style": "contour_rect", + "strokeWidth": 2, + "strokeColor": "0099FF", + "beepOnResult": true, + "vibrateOnResult": true, + "blinkAnimationOnResult": true + }, + "cancelOnResult" : true + } + } } From fcb7e94c1d17d38de1610bce7ecc7f79a80e2ab7 Mon Sep 17 00:00:00 2001 From: Gerhard Date: Thu, 13 Feb 2020 11:32:52 +0100 Subject: [PATCH 3/6] updated config for tin, dial meter --- .../RNExampleApp/config/DialMeterConfig.js | 6 +- example/RNExampleApp/config/TINConfig.js | 87 ++++++++++--------- 2 files changed, 48 insertions(+), 45 deletions(-) diff --git a/example/RNExampleApp/config/DialMeterConfig.js b/example/RNExampleApp/config/DialMeterConfig.js index 3660d7c4..add19770 100644 --- a/example/RNExampleApp/config/DialMeterConfig.js +++ b/example/RNExampleApp/config/DialMeterConfig.js @@ -24,7 +24,7 @@ export default { }, "viewPlugin": { "plugin": { - "id": "Meter_ID", + "id": "DIAL_METER", "meterPlugin": { "scanMode": "DIAL_METER" } @@ -57,9 +57,7 @@ export default { "outerAlpha": 0.3 }, "scanFeedback": { - "style": "CONTOUR_RECT", - "strokeColor": "0099FF", - "fillColor": "220099FF", + "style": "CONTOUR_RECT", "blinkOnResult": true, "beepOnResult": true, "vibrateOnResult": true diff --git a/example/RNExampleApp/config/TINConfig.js b/example/RNExampleApp/config/TINConfig.js index f5e01ba8..f1543c25 100644 --- a/example/RNExampleApp/config/TINConfig.js +++ b/example/RNExampleApp/config/TINConfig.js @@ -16,46 +16,51 @@ export default { 'b1NxUUJTL3ZFS3VYUHhhCjNnanZnS285M3lrSjJKQjVBZjZiSkE9PQo=', options: { - "camera": { - "captureResolution": "720" - }, - "flash": { - "mode": "manual", - "alignment": "bottom_left" - }, - "viewPlugin": { - "plugin": { - "id": "TIN_ID", - "ocrPlugin": { - "tinConfig": { - - } - } - }, - "cutoutConfig": { - "style": "rect", - "alignment": "top_half", - "strokeWidth": 1, - "strokeColor": "FFFFFF", - "cornerRadius": 2, - "outerColor": "000000", - "outerAlpha": 0.3, - "feedbackStrokeColor": "0099FF" - }, - "scanFeedback": { - "animation": "traverse_multi", - "animationDuration": 250, - "style": "contour_rect", - "strokeWidth": 2, - "strokeColor": "0099FF", - "beepOnResult": false, - "vibrateOnResult": true, - "blinkAnimationOnResult": true, - "cancelOnResult": true - }, - "cancelOnResult": true, - "reportingEnabled": true - } - } + "camera": { + "captureResolution": "720p" + }, + "flash": { + "mode": "manual", + "alignment": "bottom_right", + "imageOn": "flash_on", + "imageOff": "flash_off" + }, + "viewPlugin" : { + "plugin": { + "id": "TIN", + "ocrPlugin": { + "tinConfig":{ + } + } + }, + "cutoutConfig" : { + "style": "rect", + "width": 720, + "alignment": "center", + "maxWidthPercent": "80%", + "ratioFromSize": { + "width": 720, + "height": 144 + }, + "outerColor": "000000", + "outerAlpha": 0.3, + "strokeWidth": 2, + "strokeColor": "FFFFFF", + "cornerRadius": 2, + "feedbackStrokeColor": "0099FF" + }, + "scanFeedback" : { + "animation": "traverse_multi", + "animationDuration" : 250, + "style": "contour_rect", + "strokeWidth": 2, + "strokeColor": "0099FF", + "beepOnResult": true, + "vibrateOnResult": true, + "blinkAnimationOnResult": true + }, + "cancelOnResult" : true + } + } } From 2e5eff0f1e2df09a9a410c09dbcf6be6559ed410 Mon Sep 17 00:00:00 2001 From: Amir Ansari Date: Thu, 13 Feb 2020 15:47:40 +0100 Subject: [PATCH 4/6] Updated menu --- example/RNExampleApp/src/Overview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/RNExampleApp/src/Overview.js b/example/RNExampleApp/src/Overview.js index e443c3f9..e6f7d5b6 100755 --- a/example/RNExampleApp/src/Overview.js +++ b/example/RNExampleApp/src/Overview.js @@ -183,14 +183,14 @@ export default function Overview({ openAnyline, checkCameraPermissionAndOpen, di -