You can read barcodes and process the contained information in your app. The barcode scanning Action uses the device camera hardware together with barcode processing functionality. When barcodes are scanned, your app can access the data within them, such as EAN numbers and QR codes.
- Add the Capture Barcode (iOS) / Scan a Barcode (Android) Action to an Event in your app, such as the user tapping a Button. Enter display settings including informational text on iOS and sound effect status on Android. When the Action executes, the user will leave the app and see the barcode scanner screen, which looks similar to when the device camera is in operation, but with additional scanning indicators visible.
- When the user captures a barcode in the scanning screen, the Captured Event will fire. Add Actions there to retrieve the data scanned, including the type of data (EAN number, QR code, etc) and the data value itself (string of numbers, URL, text, etc). Use the Event Data to build the data into your app processing. If you need to tailor what your app does next depending on the type of data scanned, use If Else Actions in conjunction with the type (iOS) / formatString (Android) value.
- Add Actions to the nested Failed and Cancelled Events if you need to carry out different functionality when scanning does not complete.
By combining the barcode scanner Action with other Actions in your app, you can build functionality that utilizes the user’s mobile device hardware. If you simply need to access the user camera, use the Take a Photo / Select Image from Photos Actions instead.