Created
April 1, 2021 04:52
-
-
Save m3l1nd4/7e9944529d4e611e3b51d83f49b3e691 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function scanBarcode() { | |
cordova.plugins.barcodeScanner.scan( | |
function (result) { | |
document.getElementById("product-code").value = result.text; | |
getProductInfoWithYahoo(result.text); | |
}, | |
function (error) { | |
alert("Scanning failed: " + error); | |
}, | |
{ | |
preferFrontCamera: false, | |
showFlipCameraButton: false, | |
showTorchButton: false, | |
torchOn: false, | |
disableAnimations: true, | |
disableSuccessBeep: false, | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment