From bd262f7d1c145b193e13c0b04e2a7a4868e1ed98 Mon Sep 17 00:00:00 2001 From: daniteosan <58857147+daniteosan@users.noreply.github.com> Date: Mon, 15 Jan 2024 19:27:11 +0000 Subject: [PATCH] Update OSBarcodeScanner.java Added scan Type to introduce inverted qr code read --- .../plugins/barcodescanner/OSBarcodeScanner.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/android/com/outsystems/plugins/barcodescanner/OSBarcodeScanner.java b/src/android/com/outsystems/plugins/barcodescanner/OSBarcodeScanner.java index 7b7b158..60e2b75 100755 --- a/src/android/com/outsystems/plugins/barcodescanner/OSBarcodeScanner.java +++ b/src/android/com/outsystems/plugins/barcodescanner/OSBarcodeScanner.java @@ -33,13 +33,15 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo boolean scanLine = params.optBoolean("scan_line"); boolean scanButton = params.optBoolean("scan_button"); String scanText = params.optString("scan_button_text"); + int scanType = params.optInt("scan_type"); this.scan(scanInstructions, cameraDirection, scanOrientation, scanLine, scanButton, - scanText); + scanText, + scanType); return true; } return false; @@ -50,7 +52,8 @@ private void scan(String scanInstructions, int scanOrientation, boolean scanLine, boolean scanButton, - String scanText) { + String scanText, + int scanType) { IntentIntegrator integrator = new IntentIntegrator(this.cordova.getActivity()); integrator.setOrientationLocked(false); @@ -67,6 +70,7 @@ private void scan(String scanInstructions, integrator.addExtra("SCAN_LINE", scanLine); integrator.addExtra("SCAN_BUTTON", scanButton); integrator.addExtra("SCAN_TEXT", scanText); + integrator.addExtra("SCAN_TYPE", scanType); integrator.initiateScan(); this.cordova.setActivityResultCallback(this); @@ -107,4 +111,4 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) { } } -} \ No newline at end of file +}