Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
Flashlight default value #385
Browse files Browse the repository at this point in the history
Turning off found plain text #259
Remove Result Prompt #234
Custom Result Messages #219
  • Loading branch information
EddyVerbruggen committed Dec 22, 2016
1 parent 72ae2c7 commit fee66a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Binary file removed src/android/barcodescanner-release-2.1.1.aar
Binary file not shown.
Binary file added src/android/barcodescanner-release-2.1.2.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public class BarcodeScanner extends CordovaPlugin {
private static final String PREFER_FRONTCAMERA = "preferFrontCamera";
private static final String ORIENTATION = "orientation";
private static final String SHOW_FLIP_CAMERA_BUTTON = "showFlipCameraButton";
private static final String RESULTDISPLAY_DURATION = "resultDisplayDuration";
private static final String SHOW_TORCH_BUTTON = "showTorchButton";
private static final String TORCH_ON = "torchOn";
private static final String FORMATS = "formats";
private static final String PROMPT = "prompt";
private static final String TEXT_TYPE = "TEXT_TYPE";
Expand Down Expand Up @@ -174,6 +176,10 @@ public void run() {
intentScan.putExtra(Intents.Scan.CAMERA_ID, obj.optBoolean(PREFER_FRONTCAMERA, false) ? 1 : 0);
intentScan.putExtra(Intents.Scan.SHOW_FLIP_CAMERA_BUTTON, obj.optBoolean(SHOW_FLIP_CAMERA_BUTTON, false));
intentScan.putExtra(Intents.Scan.SHOW_TORCH_BUTTON, obj.optBoolean(SHOW_TORCH_BUTTON, false));
intentScan.putExtra(Intents.Scan.TORCH_ON, obj.optBoolean(TORCH_ON, false));
if (obj.has(RESULTDISPLAY_DURATION)) {
intentScan.putExtra(Intents.Scan.RESULT_DISPLAY_DURATION_MS, "" + obj.optLong(RESULTDISPLAY_DURATION));
}
if (obj.has(FORMATS)) {
intentScan.putExtra(Intents.Scan.FORMATS, obj.optString(FORMATS));
}
Expand Down

0 comments on commit fee66a7

Please sign in to comment.