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

Syntax 

1import { getBarcodeScanner } from 'lightning/mobileCapabilities';
2resumeCapture(): Promise<Object>

Parameters 

None.

Returns 

A Promise object that resolves as a Barcode with the scanned barcode details.

A rejected promise returns a BarcodeScannerFailure.

Usage 

This function reuses an existing scanning session created by beginCapture().

resumeCapture() behaves like beginCapture() in all other respects.

See Also