Skip to content

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

The ActionResult of this action is a boolean indicating whether the pre-requisites are met.


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');
  }
}