@apl-common/react-native-kaicom-scanner

1.0.7 • Public • Published

react-native-kaicom-scanner

Getting started

$ npm i @apl-common/react-native-kaicom-scanner --save

Mostly automatic installation

$ react-native link @apl-common/react-native-kaicom-scanner

Usage

import KaicomScanner, {Result} from "react-native-kaicom-scanner";
import {DeviceEventEmitter} from "react-native";

// TODO: What to do with the module?

// Start
const EVENT_NAME:string = "Scanner";
KaicomScanner.startScan(EVENT_NAME);
let  scanListener= DeviceEventEmitter.addListener(EVENT_NAME, async (event:Result) => {/* your code */})

// Stop
KaicomScanner.stopScan();
scanListener.remove()

Package Sidebar

Install

npm i @apl-common/react-native-kaicom-scanner

Weekly Downloads

2

Version

1.0.7

License

MIT

Unpacked Size

39.7 kB

Total Files

24

Last publish

Collaborators

  • apl9922
  • arranchen