# cordova-plugin-laser-scanner

> Cordova Laser Barcode Scanner Plugin

Latest version **0.0.4** (published 2016-12-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-laser-scanner
pnpm add cordova-plugin-laser-scanner
yarn add cordova-plugin-laser-scanner
bun add cordova-plugin-laser-scanner
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2016-12-02 |
| First published | 2016-12-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Rieon Ke |
| Maintainers | rieon |
| Keywords | cordova, laser, scanner, barcode, ecosystem:cordova, cordova-android |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-laser-scanner
- Repository: https://github.com/rieonke/cordova-plugin-laser-scanner
- Homepage: https://github.com/rieonke/cordova-plugin-laser-scanner#readme
- Issues: https://github.com/rieonke/cordova-plugin-laser-scanner/issues
- npm.io page: https://npm.io/package/cordova-plugin-laser-scanner

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2016-12-02
- 0.0.1 — 2016-12-01

## 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

---
_Source: https://npm.io/package/cordova-plugin-laser-scanner · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
