@rdlabo/capacitor-codescanner
v6.0.0
Published
Capacitor Plugin for Code Scanner
Downloads
20
Readme
@rdlabo/capacitor-codescanner
Capacitor Plugin for Code Scanner
Install
npm install @rdlabo/capacitor-codescanner
npx cap sync
API
present(...)
present(scannerOption: ScannerOption) => Promise<void>
| Param | Type |
| ------------------- | ------------------------------------------------------- |
| scannerOption
| ScannerOption |
addListener(...)
addListener(eventName: 'CodeScannerCatchEvent', listenerFunc: (event: { code: string; }) => void) => Promise<PluginListenerHandle>
| Param | Type |
| ------------------ | -------------------------------------------------- |
| eventName
| "CodeScannerCatchEvent" |
| listenerFunc
| (event: { code: string; }) => void |
Returns: Promise<PluginListenerHandle>
Interfaces
ScannerOption
| Prop | Type |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| detectionX
| number |
| detectionY
| number |
| detectionWidth
| number |
| detectionHeight
| number |
| metadataObjectTypes
| Record<"aztec" | "code128" | "code39" | "code39Mod43" | "code93" | "dataMatrix" | "ean13" | "ean8" | "face" | "interleaved2of5" | "itf14" | "pdf417" | "qr" | "upce" | "catBody" | "dogBody" | "humanBody" | "salientObject", []> |
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove
| () => Promise<void> |