This plugin appends Android fragment to the Main Activity of CapacitorJs app and allow barcode scanning functionality.
npm install capacitor-barcode-scanner-fragment
npx cap sync
toggleScanner() => Promise<void>
startScanner() => Promise<void>
stopScanner() => Promise<void>
isScanning() => Promise<{ isScanning: boolean; }>
Returns: Promise<{ isScanning: boolean; }>
setIsTorchEnabled(args: { enabled: boolean; }) => Promise<{ isEnabled: boolean; }>
Param | Type |
---|---|
args |
{ enabled: boolean; } |
Returns: Promise<{ isEnabled: boolean; }>