Thank you, this was very helpful.
Below is the contents of a HTML cell on a Form.
This is for Aware Native app to run on Android.
A user finds an Inventory item & this form is presented to capture the location from a barcode label on the shelf.
The Cordova Plugin from Build.PhoneGap activates the native camera, and the scanned value is returned upon scan success and inserted into the Aware field.
<script>
function StartScan() {
cordova.plugins.barcodeScanner.scan(
function (result) {
if(!result.cancelled) {
var parser = AwareApp.getFormParserFromHtmlElem (btn1);
var field = parser.getField ("tmp_ShortCode");
field.setValue (result.text);
parser.saveForm ();
}
},
function (error) {alert("Scanning failed: " + error);
}, {
preferFrontCamera : true,
showFlipCameraButton : true,
showTorchButton : true,
torchOn: true,
saveHistory: false,
prompt : "Place a barcode inside the scan area",
resultDisplayDuration: 500,
formats : "CODE_39",
orientation : "portrait",
disableAnimations : true,
disableSuccessBeep: false
}
);
}
</script>
<button onclick="StartScan()">Scan Location</button>
--> JaymerTip