title: Hide "NFC Tag type not supported" error on Samsung Galaxy devices
body: <p>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".</p>
  
  <p>I want to either block or hide that message while the app is open.</p>
  
  <p>I noticed there was <a href="https://stackoverflow.com/questions/35609113/is-it-possible-to-suppress-the-nfc-tag-type-not-supported-toast-on-a-samsung-g">one other question</a> asking for the same thing on a Galaxy S6 but it was down-voted once and then ignored.</p>
  
  <p>I found <a href="http://developer.samsung.com/forum/board/thread/view.do?boardName=General&amp;messageId=277048&amp;frm=7&amp;tagValue=nfc&amp;curPage=1" rel="nofollow noreferrer">this</a> conversation on the Samsung Developers forum, however, I could not extract an answer from what is written there:</p>
  
  <pre><code>  if (NfcAdapter.ACTION_TECH_DISCOVERED.equals(intent.getAction())) {
        myTag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); 
        tagID = intent.getByteArrayExtra(NfcAdapter.EXTRA_ID);
        alertDialog.dismiss(); 
  </code></pre>
  
  <p>It looks like the <code>alertDialog.dismiss()</code> section is what I need but there is no explanation for where they got the <code>alertDialog</code> object from.</p>