Reputation: 187
We are building a NFC application which requires the NFC tag to be read once (by a Android mobile device), the data is then Sent to a server which processes it and the processed results are sent back to the device which writes the data back to the NFC tag.
Operations performed by the mobile device (which has a NFC reader) :
The problem is that when the time taken is higher than half a minute (due to network speed and processing time taken on server side) the fourth operation (writing the processed results back to the tag) fails.
A few possible reasons for the failure could be :
The code/library (to interact with the tag) used in our Android app is provided by a third party. My knowledge of NFC ( and the ndef Android library) is limited. what I am looking for as a help from the community (if someone has experience in above situations ) is the following
Upvotes: 1
Views: 158
Reputation: 878
I would separate the 4 steps into 3 groups.
1) read the tag
2) send data to server and wait for processes results, and receive the processed results
3) write results on the tag
1) is a user interaction ("please tap the tag"),
2) happens in the background ("processing data") and
3) is again a user interaction, where I would aks the user to touch the tag again once the data is back from the server ("please tap the tag again").
This helps to separate the steps, which have undefined timing (what if the phone has temporarily no data connection? It is also difficult to expect that a user wild hold the device steadily over the tag until the data is back.
Upvotes: 1