# cordova-plugin-xt30-scanner

> Laser scanner for XT30

Latest version **0.0.2** (published 2021-12-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-xt30-scanner
pnpm add cordova-plugin-xt30-scanner
yarn add cordova-plugin-xt30-scanner
bun add cordova-plugin-xt30-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.2 |
| Published | 2021-12-31 |
| First published | 2021-12-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 76.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | shineum |
| Maintainers | shineum |
| Keywords | cordova, barcode, qrcode, scanner, laser, xt30, ecosystem:cordova, cordova-android |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-xt30-scanner
- Repository: https://github.com/shineum/cordova-plugin-xt30-scanner
- Homepage: https://github.com/shineum/cordova-plugin-xt30-scanner#readme
- Issues: https://github.com/shineum/cordova-plugin-xt30-scanner/issues
- npm.io page: https://npm.io/package/cordova-plugin-xt30-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.2 (latest) — 2021-12-31
- 0.0.1 — 2021-12-31

## README

# cordova-plugin-xt30-scanner
Cordova Beam Scanner for Point Mobile XT30

# Install

```javascript

cordova plugin add cordova-plugin-xt30-scanner

```

# Usages

### 1. Scan

```javascript
cordova.plugins.xt30scanner.scan(successCallback, errorCallback);
// then callbacks will be set and scanner will be ready.

var successCallback = function(result, metadata) {
  // metadata.type
  console.log(result, metadata);  
}

var errorCallback = function(error) {
  console.log(error);
}
```


```javascript
cordova.plugins.xt30scanner.scan();
// if you already set callbacks, calling scan() without parameters will work also.

```

### 2. Cancel

```javascript
cordova.plugins.xt30scanner.cancel();
// then the scanner is off and error callback will be fired with error message of "USER_CANCEL".

```

### 3. Beep

```javascript
cordova.plugins.xt30scanner.beep(mode);
// to control beep when the scanner reads the codes. mode : true or false

```

### 4. Set Callbacks

```javascript
cordova.plugins.xt30scanner.set(successCallback, errorCallback);
// Setting callback functions to read code with side buttons.

```

### 5. Set Trigger Mode

```javascript
cordova.plugins.xt30scanner.setTriggerMode(mode);
// Set scanner trigger mode.

// Available modes are:
// cordova.plugins.xt30scanner.TRIGGER_MODE.PULSE
// cordova.plugins.xt30scanner.TRIGGER_MODE.CONTINUOUS
// cordova.plugins.xt30scanner.TRIGGER_MODE.ONESHOT

```

# history

### 0.0.2
- Add document

### 0.0.1
- Initial publish

# License

MIT

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