2025-09-22 5:37 PM - edited 2025-09-23 12:28 AM
Hi,
I am working on a React Native project for an NFC app that needs to run on both iOS and Android. I am using the react-native-nfc-manager library to perform NFC operations. The NFC tag I am using is ST25DV, which supports NDEF and NfcV (ISO15693) technologies.
Some basic functionalities the app would perform are reading and writing raw memory blocks to the memory.
I noticed when I am using iOS device to perform read write operation, it can do so while keeping the tag intact with iOS device. I don't have to practically take the tag away from device and bring it near again to start the new nfc session.
In case of Android, to perform the writing functionality, I have to first send the command from device by pressing button, then device will start looking for NFC tag. I bring the NFC tag near the device; it detects it and locks in the session and sends the command to the tag and closes the session. Thats how the code is written.
Now if I want to read back from the tag, I press the read button and it starts looking for the tag. But I have to take the tag away from the device and bring it near to the device again for the device to detect the tag and send the new command.
The surprising thing is that ST's proprietary app in Android doesn't operate this way. You can keep the tag near to device and it will perform different operations without ever taking the tag away from device.
Is this limitation of React Native or just the Android device?
2025-09-23 12:24 AM
Is your question related to iOS or Android?
Your subject mentions iOS, but it seems the issue is occurring on Android. Could you please confirm?
2025-09-23 12:27 AM
Its on Android. Sorry I got it wrong in the title.
2025-09-23 9:17 AM
Hello,
I do not have knowledge on React Native for Android, but found the following that can help you :
In React Native for Android, you might encounter errors like "multiple operations cannot be performed on one session" when working with certain native modules, especially those dealing with resources that require exclusive access (such as NFC, Bluetooth, or database sessions).
Many Android APIs (e.g., NFC, BLE, database, camera) use the concept of a session:
For example, with react-native-nfc-manager, you can only have one NFC session open at a time.
If you try to start a new scan or write operation before the previous one is finished (or cancelled), you’ll get this error.
This is typically what you encountered.
Concerning ST's proprietary app in Android, it is a Java based development, we receive at app level (Activity) an intent from system and based on this intent we (using our ST25SDK + app) got depending of Tag technology the level of Tranceive function of the Android Tag (ISODEP, ...) and we Transceive commands.
I think it is a limitation of React Native.
Hoppe this clarify!
Rgds,FB
2025-09-24 11:52 PM
Hi France,
I also believe this may be a React Native limitation, given the differences in how it behaves on each platform. I understand the single-session limitation you mentioned in your response.
However, the issue I’m seeing is related to how Android and iOS handle these sessions individually.
On Android, between each session, the tag must be removed and then brought back in order to continue with the next session.
On iOS, the tag can remain in place, and the next session will still proceed without needing to remove and re-present the tag.
2025-09-25 12:30 AM
Hello
The approach is quite different on Android and iOS
For Android
Automatic Detection (Background):
Foreground Dispatch:
For iOS
No Background Detection:
User-Initiated Scanning :
In summary, Android is an Automatic detection and iOS is with explicit user interaction, this explains how Android and iOS handle sessions
Perhaps, you can search in React Native around the way to declare the right intent filters in the manifest ...
Just for your information, on another topic, on Android devices, Tag may become "out of date" after some times or depending of the implementation, this is an Android feature intended by design. This appears, when app store a tag handle and try to use it later on. Perhaps React Native implement a good way to avoid this !
Hope it clarify a bit
Rgds,FB