0.0.5 • Published 10 months ago

capacitor-plugin-idata-scan v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

capacitor-plugin-idata-scan

针对idata的pda设备T1型号针对性定制的扫描插件

一、具备以下核心功能点:

    1. 打开扫描头
    1. 关闭扫描头
    1. 开始扫描
    1. 停止扫描
    1. 扫描成功后调用web前端预留js方法,唤醒康复app,并跳转到治疗详情界面

二、拓展功能

    1. 配置扫描结果的输出方式
    1. 配置是否禁用物理按键(黄色按键)
    1. 配置扫描提示音、振动、指示灯
    1. 配置扫描的目标格式(条形码类型、二维码类型)

Install

npm install capacitor-plugin-idata-scan
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>
ParamType
options{ value: string; }

Returns: Promise<{ value: string; }>


init()

init() => Promise<{ value: string; }>

初始化方法,需要判断设备是否具备pad功能才调用,否则会因为硬件层找不到对应的方法而闪退并且无法捕获错误

Returns: Promise<{ value: string; }>


scanStart()

scanStart() => Promise<{ value: string; }>

打开扫描头,开启后直到扫描了二维码条形码,或者调用关闭,才会关掉扫描头,否则会一直开着

Returns: Promise<{ value: string; }>


scanStop()

scanStop() => Promise<{ value: string; }>

关闭扫描头

Returns: Promise<{ value: string; }>


scanSetTimeOut(...)

scanSetTimeOut(options: { millisecond: number; }) => Promise<{ value: string; }>

设置读头超时时间,默认为3秒,参数是毫秒

ParamType
options{ millisecond: number; }

Returns: Promise<{ value: string; }>


addListener('onScanListener', ...)

addListener(eventName: 'onScanListener', listenerFunc: (data: any) => void) => Promise<PluginListenerHandle>
ParamType
eventName'onScanListener'
listenerFunc(data: any) => void

Returns: Promise<PluginListenerHandle>


Interfaces

PluginListenerHandle

PropType
remove() => Promise<void>
0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago