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

ydistri/react-native-datawedge-intents-kotlin

 
 

Repository files navigation

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 60.5%
  • TypeScript 27.4%
  • Ruby 5.7%
  • JavaScript 4.1%
  • Objective-C++ 0.9%
  • Swift 0.9%
  • Other 0.5%