react-native-zebra-rfid-barcode-ef-tech
Version:
This React Native module enables seamless integration with Zebra RFID readers and barcode scanners.
32 lines (31 loc) • 1.39 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getAllDevices = exports.connectToDevice = exports.ZebraEventEmitter = exports.ZebraEvent = void 0;
var _reactNative = require("react-native");
const LINKING_ERROR = `The package 'react-native-zebra-rfid-barcode-ef-tech' doesn't seem to be linked. Make sure: \n\n` + _reactNative.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 = _reactNative.NativeModules.ZebraRfidBarcode ? _reactNative.NativeModules.ZebraRfidBarcode : new Proxy({}, {
get() {
throw new Error(LINKING_ERROR);
}
});
const getAllDevices = async () => {
return await ZebraRfidBarcode.getAllDevices();
};
exports.getAllDevices = getAllDevices;
const connectToDevice = deviceName => {
return ZebraRfidBarcode.connectToDevice(deviceName);
};
exports.connectToDevice = connectToDevice;
const ZebraEventEmitter = exports.ZebraEventEmitter = new _reactNative.NativeEventEmitter(ZebraRfidBarcode);
let ZebraEvent = exports.ZebraEvent = /*#__PURE__*/function (ZebraEvent) {
ZebraEvent["ON_DEVICE_CONNECTED"] = "onZebraConnected";
ZebraEvent["ON_RFID"] = "onZebraRFIDReaded";
ZebraEvent["ON_BARCODE"] = "onZebraBarcodeScanned";
return ZebraEvent;
}({});
//# sourceMappingURL=index.js.map
;