Setting a timeout on TagAccess.readEvent()

P Philippe Hacquin 1 month 3 weeks ago
20 0 0

Hello, I am using the RFID SDK version 2.0.2.124 in Android 10, to read tags with a RFD40 + TC26. EPC memory bank is read first using a prefilter, then USER memory bank second after I have selected the EPC with the highest RSSI. 
I am using TagAccess.readEvent() to read user memory, and sometimes the operation will not complete because the tag is out of reach for example. The read operation seems to try to read forever.
I want to handle a timeout of a few seconds on this operation, and have the library call a callback method/function so that I can warn user and reset the read cycle (look for tags, select EPC and try to read user memory again).
How can I do that ? I could not find any solution to my problem (except maybe using TagAccess.readWait() maybe and handle a timeout by myself ?)
Thanks for the feedback

CONTACT
Can’t find what you’re looking for?