react-native-abal-scanner-sdk
v1.0.2
Published
This Library for T80 PDA Barcode Scanner with React-native
Downloads
3
Readme
react-native-abal-scanner-sdk
This Library for T80 PDA Barcode Scanner with React-native
Getting started
$ npm install react-native-abal-scanner-sdk --save
Mostly automatic installation
$ react-native link react-native-abal-scanner-sdk
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.nextg.reactnative.RNAbalScannerSdkPackage;
to the imports at the top of the file - Add
new RNAbalScannerSdkPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-abal-scanner-sdk' project(':react-native-abal-scanner-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-abal-scanner-sdk/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-abal-scanner-sdk')
Usage
import RNAbalScannerSdk from 'react-native-abal-scanner-sdk';
RNAbalScannerSdk.startScan();
RNAbalScannerSdk.stopScan();
RNAbalScannerSdk.openScan();
RNAbalScannerSdk.closeScan();
RNAbalScannerSdk.on('scan.rcv.message', event=>{
console.log(event);
})