rn-honeywell-scanner
v1.1.2
Published
Bridge to use the Honeywell scanner
Downloads
113
Readme
rn-honeywell-scanner
This module is fork of react-native-honeywell-scanner-v2 with a fallback fix for IOS and just experimenting with my first react native package upload
Getting started
$ npm install rn-honeywell-scanner --save
Usage
import HoneywellScanner from 'rn-honeywell-scanner';
...
useEffect(() => {
if( HoneywellScanner.isCompatible ) {
HoneywellScanner.startReader().then((claimed) => {
console.log(claimed ? 'Barcode reader is claimed' : 'Barcode reader is busy');
HoneywellScanner.onBarcodeReadSuccess(event => {
console.log('Received data', event.data);
});
});
return(
() => {
HoneywellScanner.stopReader().then(() => {
console.log("Freedom!!");
HoneywellScanner.offBarcodeReadSuccess();
});
}
)
}
}, []);