Skip to content

React Native Android module to interface with Zebra's DataWedge using Android Intents to control the barcode scanner and retrieve scanned data

License

Notifications You must be signed in to change notification settings

edritech93/react-native-datawedge-intents

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 @edritech93/react-native-datawedge-intents

Usage

init scanner and listen

import {
  ScannerInit,
  ScannerReceiver,
} from '@edritech93/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);
  // get data here
  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

About

React Native Android module to interface with Zebra's DataWedge using Android Intents to control the barcode scanner and retrieve scanned data

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •