Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Scan Barcodes on a Mobile Device
A Lightning web component can use a mobile device’s camera and mobile OS platform
features to scan a barcode, such as a UPC symbol or QR code. When a barcode is successfully
scanned, the data that was read from the barcode is returned to the Lightning web component that
invoked it.
Scanning is performed locally on the mobile device, and doesn’t need a network connection.
BarcodeScanner does require access to platform-specific APIs that are available only within
compatible Salesforce mobile apps.
BarcodeScanner provides to your component a string value of the data encoded in a scanned barcode. It doesn't attempt to interpret or process the decoded value.