Newer Version Available
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.