First of all, you should check whether or not the .get
call worked by checking whether isoDep == null
.
As for your IOException
, it is hard to identify the specific cause of the issue if you cannot provide the code. Methods for extracting data from tags vary from manufacturer to manufacturer. You noted that the tag also supports NfcA
, it might be worth investigating if this technology doesn't work too.
However, some things to consider:
manpreet
Best Answer
2 years ago
I'm using NFC technology for one of my projects in Android. I have successfully implemented the Tag detection and based on the Tag I know which class I need to use to extract the data. But there is one problem the card which I need to use/tap to get the data is using the IsoDep technology rather than NDEF one. I know how to extract the data from a card which is working on NDEF technology but I'm getting stuck here because of the IsoDep technology. I'm sharing my code snippet with this question for better understanding.
So here I'm getting TAG_DISCOVERED through NFCAdapter and inside the condition I'm getting IsoDep, tech.NFcA, NdefFormattable as tag variable value. I'm creating the instance of IsoDep class and calling connect() method. Here I'm getting IOException everytime I'm trying to start the connection to read the data I don't know why !!! Can anyone help me to solve this? Any help would be appreciable.
Thanks