NFC 태그에서 데이터를 지우려고 할 때 문제가 있습니다. MifareUltralight 유형의 NFC 태그를 사용하고 있습니다. 제발 해결책을 찾을 수 있도록 도와주세요. 여기 내 코드가있다. 나는 그것은 당신의 장치가 MifareUltralight 형식을 지원하지 않습니다 수 있습니다 hereandroid에서 NFC 태그 데이터를 지우는 방법은 무엇입니까?
if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(intent.getAction())) {
mytag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
}
NdefFormatable formatable = NdefFormatable.get(mytag);
if (formatable != null) { // Here I'm getting formatable null
try {
formatable.connect();
try {
formatable.format(methodGetMsg());
} catch (Exception e) {
// let the user know the tag refused to format
}
} catch (Exception e) {
// let the user know the tag refused to connect
} finally {
try {
formatable.close();
} catch (IOException e) {
e.printStackTrace();
}
}
} else {
// let the user know the tag cannot be formatted
}
의 중복 가능성 [NdefFormatable를 사용하여 NFC 카드를 포맷 할 수 없습니다 (http://stackoverflow.com/questions/25512204/not-able-to-format-nfc-card-using-ndefformatable) –