Hi I am trying to read from NFC Tag. But I am getting an exception.
I have put this condition to detect the tag?
if(NfcAdapter.ACTION_TAG_DISCOVERED
To answer you question about the code -
That will always be true - NfcAdapter.ACTION_TAG_DISCOVERED
is a constant value - you need to use:
getIntent().getAction().equals(NfcAdapter.ACTION_TAG_DISCOVERED)
to compare it.
But, that probably has nothing to do with your exception -