CheckBarcodeScannerPrerequisite¶
The properties defined in Action are also applicable to this action.
CheckBarcodeScannerPrerequisite Properties¶
Property | Type | Required |
---|---|---|
_Type | const |
Required |
_Type¶
- type:
const
The value of this property must be equal to:
"Action.Type.CheckBarcodeScannerPrerequisite"
Action Result¶
Refer to the MDK Guide to understand what an action result is.
The success ActionResult of this action is a boolean indicating whether the pre-requisites are met. The failure ActionResult is an error message.
Examples¶
{
"_Type": "Action.Type.CheckBarcodeScannerPrerequisite",
"OnSuccess": "/MDKApp/Rules/BarcodeScanner/CheckBarcodeScannerPrerequisiteResult.js",
"OnFailure": "/MDKApp/Actions/BarcodeScanner/CheckBarcodeScannerPrerequisiteFailure.action",
"ActionResult": {
"_Name": "CheckCamera"
}
}
export default function CheckBarcodeScannerPrerequisiteResult(pageProxy) {
var actionResult = pageProxy.getActionResult('CheckCamera');
if (actionResult) {
pageProxy.setActionBinding({
'IsCameraReady': actionResult.data,
});
return pageProxy.executeAction('/MDKDevApp/Actions/Navigation/BarcodeScanner/NavToBarcodeScannerPage.action');
}
}