diff --git a/example/RNExampleApp/config/DialMeterConfig.js b/example/RNExampleApp/config/DialMeterConfig.js index 3660d7c4..9e8b74bc 100644 --- a/example/RNExampleApp/config/DialMeterConfig.js +++ b/example/RNExampleApp/config/DialMeterConfig.js @@ -24,12 +24,12 @@ export default { }, "viewPlugin": { "plugin": { - "id": "Meter_ID", + "id": "DIAL_METER", "meterPlugin": { "scanMode": "DIAL_METER" } }, - "cutout": { + "cutoutConfig": { "style": "rect", "maxWidthPercent": "90%", "maxHeightPercent": "90%", @@ -54,12 +54,13 @@ export default { "cornerRadius": 4, "strokeColor": "FFFFFF", "outerColor": "000000", - "outerAlpha": 0.3 + "outerAlpha": 0.3, + "feedbackStrokeColor": "0099FF" }, "scanFeedback": { - "style": "CONTOUR_RECT", - "strokeColor": "0099FF", - "fillColor": "220099FF", + "style": "CONTOUR_RECT", + "strokeColor": "0099FF", + "fillColor": "220099FF", "blinkOnResult": true, "beepOnResult": true, "vibrateOnResult": true 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