crypton-tech / react-native-scanner-zebra

React Native module for Zebra barcode scanners
MIT License
10 stars 7 forks source link

react-native-scanner-zebra

*Note: This package is still under beta version**

Getting started

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

Mostly automatic installation

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

Additions steps for IOS Application

Methods:

Usage

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

// Called when barcode is scanned
const onScan = useCallback((barcode, scannerId) => {
    // Handle the barcode
}, []);

// Called when scanner event occurred
const onEvent = useCallback((event, scannerId) => {
    // Handle the event
}, []);

const { setEnabled, getActiveScanners } = useZebraScanner(onScan, onEvent);