How andre-barros/react-native-rfid-chainway-c72 works
This repository is a React Native bridge for Chainway C72 RFID reader operations. An app calls the JavaScript API to initialize the reader, scan tags, inspect or change power, write EPC data, or find a tag; Android performs the hardware operations and emits reader/tag events for JavaScript listeners. The Android implementation and JS event handling are excerpted. The iOS implementation exists in the tree, but its behavior was not sampled, so its connection is shown as unverified.
Main entry points: RfidChainwayC72Module.kt Android reader module · NativeRfidChainwayC72.ts TurboModule spec · index.tsx Reader API · RfidChainwayC72Package.kt Android module registration
Components 10
JavaScript API
- Reader API
src/index.tsx - TurboModule spec
src/NativeRfidChainwayC72.ts - Event listeners
src/index.tsx
Native reader
- Android reader module
android/src/main/java/com/rfidchainwayc72/RfidChainwayC72Module.kt - Tag inventory worker
android/src/main/java/com/rfidchainwayc72/RfidChainwayC72Module.kt - Android module registration
android/src/main/java/com/rfidchainwayc72/RfidChainwayC72Package.kt - iOS reader module
ios/RfidChainwayC72.mm
Other components
- React Native app
- Chainway RFID reader
- React Native events
Connections 10
- React Native app → Reader API: calls operations
README.md - Reader API → TurboModule spec: delegates operations
src/index.tsx - Android module registration → Android reader module: registers module
android/src/main/java/com/rfidchainwayc72/RfidChainwayC72Package.kt - Android reader module → Chainway RFID reader: controls reader
android/src/main/java/com/rfidchainwayc72/RfidChainwayC72Module.kt - Android reader module → Tag inventory worker: starts worker
android/src/main/java/com/rfidchainwayc72/RfidChainwayC72Module.kt - Tag inventory worker → Chainway RFID reader: reads tag buffer
android/src/main/java/com/rfidchainwayc72/RfidChainwayC72Module.kt - Android reader module → React Native events: emits events
android/src/main/java/com/rfidchainwayc72/RfidChainwayC72Module.kt - Event listeners → React Native events: subscribes events
src/index.tsx - TurboModule spec → Android reader module: maps native calls
- TurboModule spec → iOS reader module: maps native calls