Has anyone used @capacitor/barcode-scanner plugin?

It might be just me, but the documentation of the Outsystems Capacitor barcode scanner doesn’t explain how it should be implemented much at all.

It explains how to install and set it up, but not how to use it. Has anyone used it before? I’m not sure what to import or how to access the mentioned scanBarcode() function.

Any help would be much appreciated as there seems to be nothing online about this plugin.

Take a look at the example here - capacitor-barcode-scanner/example-app/src/pages/Home.tsx at 457aefb36d203e4ac465502b4e0cf53de26b3e8b · ionic-team/capacitor-barcode-scanner · GitHub

import { CapacitorBarcodeScanner, CapacitorBarcodeScannerTypeHint } from '@capacitor/barcode-scanner';

const result = await CapacitorBarcodeScanner.scanBarcode({
  hint: CapacitorBarcodeScannerTypeHint.ALL
});
2 Likes

Thank you so much! This is exactly what I was looking for.

2 Likes

really helpful to build application.
thank you so much for sharing