@kduma-autoid/capacitor-sunmi-camera-scanner
v0.1.0
Published
Capacitor plugin for interaction with Sunmi Camera-based barcode scanning library
Downloads
24
Readme
@kduma-autoid/capacitor-sunmi-camera-scanner
Capacitor plugin for interaction with Sunmi Camera-based barcode scanning library
Install
npm install @kduma-autoid/capacitor-sunmi-camera-scanner
npx cap sync
API
scan(...)
scan(options?: ScanParams | undefined) => Promise<{ scans: { type: string; value: string; }[]; }>
| Param | Type |
| ------------- | ------------------------------------------------- |
| options
| ScanParams |
Returns: Promise<{ scans: { type: string; value: string; }[]; }>
Interfaces
ScanParams
| Prop | Type | Description | Default |
| ------------------------------ | --------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| play_sound
| boolean | Sound prompt after scan completes | true |
| play_vibrate
| boolean | Vibrate when scan completes. At present, M1 hardware supports this configuration for vibration, while V1 does not support. | false |
| show_setting
| boolean | Whether to display the Settings button in the upper right corner | false |
| show_album_selector
| boolean | Whether to display the button "select picture from album" | false |
| show_flashlight
| boolean | Whether to display the flashlight | false |
| recognize_multiple_codes
| boolean | Recognize multiple QR codes in the image | false |
| recognize_inverse_codes
| boolean | Allow to read the reverse color QR code | false |
| scan_mode
| boolean | Whether cycle mode | false |
| symbologies
| Symbologies | Symbologies configuration | |
Symbologies
| Prop | Type | Description | Default |
| ------------------------ | -------------------- | ----------------------------------------------- | ------------------ |
| ean_8
| boolean | Allow to read the EAN-8 barcode | false |
| upc_e
| boolean | Allow to read the UPC-E barcode | false |
| isbn_10
| boolean | Allow to read the ISBN-10 (from EAN-13) barcode | false |
| code_11
| boolean | Allow to read the CODE-11 barcode | false |
| upc_a
| boolean | Allow to read the UPC-A barcode | false |
| ean_13
| boolean | Allow to read the AN-13 barcode | false |
| isbn_13
| boolean | Allow to read the ISBN-13 (from EAN-13) barcode | false |
| interleaved_2_of_5
| boolean | Allow to read the Interleaved 2 of 5 barcode | false |
| code_128
| boolean | Allow to read the ECode 128 barcode | false |
| codabar
| boolean | Allow to read the Codabar barcode | false |
| code_39
| boolean | Allow to read the Code 39 barcode | false |
| code_93
| boolean | Allow to read the Code 93 barcode | false |
| databar
| boolean | Allow to read the DataBar (RSS-14) barcode | false |
| databar_exp
| boolean | Allow to read the DataBar Expanded barcode | false |
| micro_pdf417
| boolean | Allow to read the Micro PDF417 barcode | false |
| microqr
| boolean | Allow to read the Micro QR Code barcode | false |
| qr_code
| boolean | Allow to read the QR code | false |
| pdf417
| boolean | Allow to read the PDF417 barcode | false |
| data_matrix
| boolean | Allow to read the DataMatrix code | false |
| aztec
| boolean | Allow to read the AZTEC code | false |
| hanxin
| boolean | Allow to read the Hanxin code | false |