endCapture() (Legacy)

Use this function to end a scanning session, close the mobile OS scanning interface, and dispose of resources.

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.

None.

None.

After calling endCapture(), you can call beginCapture() on an existing or new BarcodeScanner instance to start a new scanning session.

See Also