Reply To: Crash when executing startForeGroundDispatch

Forum MIFARE SDK Crash when executing startForeGroundDispatch Reply To: Crash when executing startForeGroundDispatch

Re: Crash when executing startForeGroundDispatch

5. February 2018 at 12:23
Hi Peter,

To drive a single resource (the NFC adapter) from two entities is always critical. I would drive the NFC adapter in a background thread and communicate to the background thread with Java synchronizing methods. Then it does not matter how many entities access the NFC interface. It is better to put all NFC tasks into a separate thread, because you have to deal with unpredictable situations, exceptions and time delays.

The TapLinx team
+ 1  |  - 0