1.0.9 • Published 6 months ago

@xiphoo/react-native-zebra-scanner v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

react-native-zebra-scanner

Getting started

$ npm install react-native-zebra-scanner --save

Mostly automatic installation

$ react-native link react-native-zebra-scanner

Manual installation

Android

  1. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add new ZebraScannerPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-zebra-scanner'
    project(':react-native-zebra-scanner').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-zebra-scanner/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      implementation project(':react-native-zebra-scanner')

Usage

import ZebraScanner from 'react-native-zebra-scanner';

// Check if hardware scanner is available
await ZebraScanner.isAvailable(); // true or false

// Add listener
const scanListener = (scannedCode) => {
	// scannedCode is string. '01245234562345' etc.
}
ZebraScanner.addScanListener(scanListener)
// Remove listener
ZebraScanner.removeScanListener(scanListener)
1.0.9

6 months ago

1.0.8

6 months ago

1.0.7

6 months ago

1.0.6

11 months ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago