Hide "NFC Tag type not supported" error on Samsung Galaxy devices

Viewed 150289

I am working on an app that scans just the UID of MIFARE Classic cards to facilitate attendance registration. I have got it working. However, every time I scan a card on my Galaxy S4, I get a toast stating "NFC tag type not supported".

I want to either block or hide that message while the app is open.

I noticed there was one other question asking for the same thing on a Galaxy S6 but it was down-voted once and then ignored.

I found this conversation on the Samsung Developers forum, however, I could not extract an answer from what is written there:

  if (NfcAdapter.ACTION_TECH_DISCOVERED.equals(intent.getAction())) {
      myTag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); 
      tagID = intent.getByteArrayExtra(NfcAdapter.EXTRA_ID);
      alertDialog.dismiss(); 

It looks like the alertDialog.dismiss() section is what I need but there is no explanation for where they got the alertDialog object from.

1 Answers
Related