Goal: Create a showBarcodeScanner action with enabled torch, camera switch, overlay view functionality, define qr, ean8 as recognized barcode formats and provide onSuccess and onError events to it.
showTorch, showCameraSwitch, showOverlayView, formats, onSuccess and onError keys have to be assigned within the params object of the action.
{
"type": "showBarcodeScanner",
"params": {
"showTorch": true,
"showCameraSwitch": true,
"showOverlayView": true,
"formats": [
"qr",
"ean8"
],
"onSuccess": "barcodeScanSuccess",
"onError": "barcodeScanError"
}
}