Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Müller committed Mar 14, 2020
2 parents 438455f + f0b4353 commit 80a30b7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
13 changes: 7 additions & 6 deletions example/RNExampleApp/config/DialMeterConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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%",
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ public static boolean getNativeBarcodeMode() {
return nativeBarcodeEnabled;
}

public static void clearFinalBarcodeList() {
finalBarcodeList=null;
}

public static JSONArray arrayOfDetectedBarcodes() {

if (nativeBarcodeEnabled) {
Expand Down Expand Up @@ -261,7 +265,7 @@ public static void enableNativeBarcode(ScanView anylineScanView, final List<Barc
anylineScanView.getCameraView().enableBarcodeDetection(new NativeBarcodeResultListener() {
@Override
public void onFailure(String e) {
finalBarcodeList=null; // otherwise result from previous scan would be shown
//finalBarcodeList=null; // otherwise result from previous scan would be shown
}

@Override
Expand Down

0 comments on commit 80a30b7

Please sign in to comment.