nadam / nfc-reader

Simple NFC Reader for Android
903 stars 354 forks source link

wrong tag type detected #10

Closed andreaskern closed 7 years ago

andreaskern commented 10 years ago

the reader shows a NTAG203 as Mifare Ultralight C

nadam commented 10 years ago

Probably a bug in Android or the NFC hardware unless NTAG203 is somehow compatible with Mifare Ultralight C. The app just displays whatever information it receives from Android.

        if (tech.equals(MifareUltralight.class.getName())) {
            sb.append('\n');
            MifareUltralight mifareUlTag = MifareUltralight.get(tag);
            String type = "Unknown";
            switch (mifareUlTag.getType()) {
            case MifareUltralight.TYPE_ULTRALIGHT:
                type = "Ultralight";
                break;
            case MifareUltralight.TYPE_ULTRALIGHT_C:
                type = "Ultralight C";
                break;
            }
            sb.append("Mifare Ultralight type: ");
            sb.append(type);
        }