Use the Barcode Plugin in your apps to let users scan barcodes and QR codes.
See Adding plugins to learn how to install and reference a plugin in your OutSystems apps, and how to install a sample app.
To let users scan barcodes and QR codes in the app, do the following in Service Studio:
Go to Logic > Client Actions > BarcodePlugin.
Drag the ScanBarcode action to the flow. This action opens the camera in the app for scanning.
Check the ScanResult value for the result of the scan.
Barcode Plugin provides some additional configurations to improve the experience for the end users when they scan a new barcode or QR code.
You can set up the following configurations in the ScanBarcode client action:
- Helper Title: The title of the scanner. Android only.
- Helper Instructions: The instructions for the scanning. Android only.
- Camera: There are two options for the camera, back and front. The default value is back.
- Flash: There are three options for the flash, auto, off and on. The default value is "auto".
- DrawSight: If set to True, draws a red line of sight in the center of the scanner view. The default value is True.