react-native-datawedge-intents
React Native Android module to interface with Zebra's DataWedge using Android Intents to control the barcode scanner and retrieve scanned data
Installation
npm install @whity3d/react-native-datawedge-intents
Usage
init scanner and listen
import {
ScannerInit,
ScannerReceiver,
} from '@whity3d/react-native-datawedge-intents';
const eventEmitter = new NativeEventEmitter();
const profileConfig: ProfileConfigType = {
name: 'Example',
package: 'datawedgeintents.example',
};
ScannerInit(profileConfig);
const subscription = eventEmitter.addListener(
'datawedge_broadcast_intent',
_broadcastReceiverHandler
);
return () => {
subscription.remove();
};
const _broadcastReceiverHandler = (intent: any) => {
const objResult = ScannerReceiver(intent);
console.log(objResult.data);
};
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library