barcodeScanner

Description

Activates a barcode scanner using the camera of the device.

Input / Parameter

Output

N/A

Callback

callback

The function to be executed if the barcode scanner is activated successfully.

errorCallback

The function to be executed if the barcode scanner is not activated successfully.

Example

In this example, we will scan a barcode and display the value in a dialog.

Steps

  1. Drag a button to a page in the mobile designer. Select the event click and drag the barcodeScanner function to the event flow.

  2. Drag the function to be executed when the barcode scanner is activated successfully and when it failed. In this example, we are using the Log.write function. Fill in the parameters of the function.

Result

When the button is pressed, the barcode scanner will be activated. After scanning the barcode, the value will be displayed in the console.

Last updated