react-native-zebra-rfid-barcode-ef-tech
Version:
This React Native module enables seamless integration with Zebra RFID readers and barcode scanners.
24 lines • 1.08 kB
JavaScript
import { NativeEventEmitter, NativeModules, Platform } from 'react-native';
const LINKING_ERROR = `The package 'react-native-zebra-rfid-barcode-ef-tech' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
ios: "- You have run 'pod install'\n",
default: ''
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
const ZebraRfidBarcode = NativeModules.ZebraRfidBarcode ? NativeModules.ZebraRfidBarcode : new Proxy({}, {
get() {
throw new Error(LINKING_ERROR);
}
});
export const getAllDevices = async () => {
return await ZebraRfidBarcode.getAllDevices();
};
export const connectToDevice = deviceName => {
return ZebraRfidBarcode.connectToDevice(deviceName);
};
export const ZebraEventEmitter = new NativeEventEmitter(ZebraRfidBarcode);
export let ZebraEvent = /*#__PURE__*/function (ZebraEvent) {
ZebraEvent["ON_DEVICE_CONNECTED"] = "onZebraConnected";
ZebraEvent["ON_RFID"] = "onZebraRFIDReaded";
ZebraEvent["ON_BARCODE"] = "onZebraBarcodeScanned";
return ZebraEvent;
}({});
//# sourceMappingURL=index.js.map