Formatting a Mifare Ultralight C to NDEF
问题 I want to format a Mifare Ultralight C to handle NDEF messages. I have written the code below and it works just fine with the Mifare Classic 1K chips but it gets an IOExeption when i try and connect to the Ultralight C chip. NdefFormatable format = NdefFormatable.get(tag) if(format != null){ try { format.connect(); format.format(new NdefMessage(new NdefRecord(NdefRecord.TNF_EMPTY, null, null, null))); format.close(); Toast.makeText(getApplicationContext(), "Tag formated.", Toast.LENGTH_LONG)