0.1.4 • Published 2 years ago

react-native-rfid-chainway-r6 v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-rfid-chainway-r6

handle rfid for module chainway r6

Installation

npm install react-native-rfid-chainway-r6

Usage

import RfidChainwayR6 from "react-native-rfid-chainway-r6";

Scan devices BLE

  RfidChainwayR6.ScanBLE()

Stop scan devices BLE

  RfidChainwayR6.stopScanBLE()

Connect devices BLE

   RfidChainwayR6.connectAddress('address').then(res => {
     // res is divices infomation connected
    });

Start read RFID

  RfidChainwayR6.startScanRFID()

Stop read RFID

  RfidChainwayR6.stop()

Clear RFID

  RfidChainwayR6.clearData().then(res => {
    //res == true =>  done
    //res != true =>  fail
  })

EVENT LISTENER

Listen devices infomation BLE

  DeviceEventEmitter.addListener('ScanBLEListenner', res => {
    // res is the information of a device when found
  })

Listen RFID

  DeviceEventEmitter.addListener('ReadRFIDListenner', res => {
    // res is the information of a RFID tag when found
  })

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT