Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rieonke/cordova-plugin-laser-scanner
Cordova Laser Scanner for Speedata Industrial PDA devices
https://github.com/rieonke/cordova-plugin-laser-scanner
Last synced: 2 months ago
JSON representation
Cordova Laser Scanner for Speedata Industrial PDA devices
- Host: GitHub
- URL: https://github.com/rieonke/cordova-plugin-laser-scanner
- Owner: rieonke
- License: mit
- Created: 2016-12-01T06:18:30.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-04T13:14:29.000Z (9 months ago)
- Last Synced: 2024-11-14T07:04:10.520Z (3 months ago)
- Language: Java
- Size: 1.74 MB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cordova-plugin-laser-scanner
Cordova Laser Scanner for Speedata Industrial PDA devices思必拓(Speedata)手持终端激光扫描器的Cordova接口
# Install 安装
```javascript
cordova plugin add cordova-plugin-laser-scanner
```
# Usages 用途
### 1.Call scan 调用扫描头扫描
```javascript
LaserScanner.scan();
// then the device will blink and read the barcode
// 此时设备会发出激光开始扫描二维码```
### 2.Receive scan result from device 从设备获取扫描结果
```javascript
// when the barcode is decoded and result is returned by device
// both a window and document `barcodeReceived` event will be fired
// register a listener and you can get the data form `LaserScanner.result`// 当二维码被解码完毕并且返回时
// 会触发 window 和 document 的 `barcodeReceived` 事件
// 监听这个事件并从`LaserScanner.result`中获取结果数据window.addEventListener("barcodeReceived",function(){ //also document.addEventListener.....
var result = LaserScanner.result;
console.log("the result of this barcode is + " result);
},false)```
# Demo Guide 示例使用
```shell
cd demo
# will automatically install the plugins (based on config.xml)
# 将会根据config.xml自动安装
cordova platform add android# build android application
# 编译打包apk文件
cordova build android```
# License
MIT