Develop Secure Code
BarcodeScanner Constants
BarcodeScanner Data Types
getBarcodeScanner()
isAvailable()
scan(options)
dismiss()
beginCapture(options) (Legacy)
resumeCapture() (Legacy)
endCapture() (Legacy)
resumeCapture() (Legacy)Use this function to continue a scanning session.
We recommend using the modern scan() and dismiss() APIs in your LWC’s scanning code to streamline your development experience. The legacy APIs beginCapture(), resumeCapture(), and endCapture() are still available, but will be retired in a future release.
Note
1import { getBarcodeScanner } from 'lightning/mobileCapabilities';
2resumeCapture(): Promise<Object>None.
A Promise object that resolves as a Barcode with the scanned barcode details.
A rejected promise returns a BarcodeScannerFailure.
This function reuses an existing scanning session created by beginCapture().
resumeCapture() behaves like beginCapture() in all other respects.
See Also