Search code examples
androidtagsnfcmifaredetach

How to detect NFC tag was removed


I am new at NFC technology. I am trying to read and write Mifare Classic 4K tags. I succeeded reading and writing. I can detect the tag on onNewIntent action.

My problem is that I could't detect when an NFC tag was removed (similar to onNewIntent when detecting a tag).

How can I solve this problem?


Solution

  • You can check by calling isoDep.isConnected(); in IsoDep