1.0.3 • Published 4 years ago

imotion-scanner v1.0.3

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
4 years ago

imotion-scanner

For imotion scanner

Install

npm install imotion-scanner
npx cap sync

API

connectDevice()

connectDevice() => Promise<ResultStatus>

Connect handheld scanner service

Returns: Promise<ResultStatus>

Since: 1.0.0


disconnectDevice()

disconnectDevice() => Promise<ResultStatus>

Disconnect handheld scanner service

Returns: Promise<ResultStatus>

Since: 1.0.0


addListener('barcodeScanChange', ...)

addListener(eventName: 'barcodeScanChange', listenerFunc: barcodeScanListener) => Promise<PluginListenerHandle> & PluginListenerHandle

Listen to the scanner return

ParamType
eventName'barcodeScanChange'
listenerFuncbarcodeScanListener

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 1.0.0


addListener('scanTimeoutChange', ...)

addListener(eventName: 'scanTimeoutChange', listenerFunc: scanTimeoutListener) => Promise<PluginListenerHandle> & PluginListenerHandle

監聽掃描器操作是否逾時

ParamType
eventName'scanTimeoutChange'
listenerFuncscanTimeoutListener

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 1.0.0


addListener('ScanEventChange', ...)

addListener(eventName: 'ScanEventChange', listenerFunc: scanEventListener) => Promise<PluginListenerHandle> & PluginListenerHandle

監聽掃描器操作

ParamType
eventName'ScanEventChange'
listenerFuncscanEventListener

Returns: Promise<PluginListenerHandle> & PluginListenerHandle

Since: 1.0.0


removeAllListeners()

removeAllListeners() => Promise<void>

移除本套件所有監聽事件

Since: 1.0.0


Interfaces

ResultStatus

PropType
statusboolean
messagestring

PluginListenerHandle

PropType
remove() => Promise<void>

BarcodeParams

PropType
barcodestring
codeIDnumber

Type Aliases

barcodeScanListener

(status: BarcodeParams): void

scanTimeoutListener

(status: ResultStatus): void

scanEventListener

(status: ResultStatus): void

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago