react-native-zebra-rfid-inovabiz

0.0.3 • Public • Published

React native RFID reader

for Zebra RFD8500 and MC33 readers

React-native module for scanning RFID tags with Zebra RFD8500 and MC33

Install:

Install the module

npm install --save react-native-zebra-rfid-inovabiz

Link native dependencies

react-native link react-native-zebra-rfid-inovabiz

Add the node_modules library directory in repositories under build.gradle, e.g. (added the flatDir line):

allprojects {
    repositories {
        google()
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        // Manually added for react-native-zebra-rfid-inovabiz
        flatDir { dirs "$rootDir/../node_modules/react-native-zebra-rfid-inovabiz/android/libs" }
    }
}

This module includes the Zebra RFID API3_SDK_2.0.1.27.aar file included. Depending on your setup you may need to override some settings in the aar, e.g. minsdk or allowBackup, in the android manifest.

Usage:

import RFIDScanner, { RFIDScannerEvent } from 'react-native-zebra-rfid-inovabiz';
 
// Init and connect
RFIDScanner.init();
 
// Register callback
RFIDScanner.on(RFIDScannerEvent.TAGS, onRfidResult);
 
// Remove callback
RFIDScanner.removeon(RFIDScannerEvent.TAGS, onRfidResult);
 
// Shutdown
RFIDScanner.shutdown();
 
// Callback, tags is an array of strings
// Read triggered by hardware trigger, or 
// programmatically by calling
// RFIDScanner.read() or RFIDScanner.cancel()
 
const onRfidResult = (tags) => {
    console.info(' TAGS: ' + JSON.stringify(tags));
}

Package Sidebar

Install

npm i react-native-zebra-rfid-inovabiz

Weekly Downloads

2

Version

0.0.3

License

MIT

Unpacked Size

598 kB

Total Files

19

Last publish

Collaborators

  • ivaldovinos