mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
26 lines
545 B
TypeScript
26 lines
545 B
TypeScript
import HoneywellScanner from 'react-native-honeywell-scanner';
|
|
|
|
class Example {
|
|
async test() {
|
|
if (!HoneywellScanner.isCompatible) {
|
|
return;
|
|
}
|
|
|
|
const readerConnected = await HoneywellScanner.startReader();
|
|
|
|
if (!readerConnected) {
|
|
return;
|
|
}
|
|
|
|
HoneywellScanner.on('barcodeReadSuccess', event => {
|
|
// TODO
|
|
});
|
|
|
|
HoneywellScanner.on('barcodeReadFail', () => {
|
|
// TODO
|
|
});
|
|
|
|
await HoneywellScanner.stopReader();
|
|
}
|
|
}
|