get(tag)在Android中返回null-Mifare支持
1.get(tag)在Android中返回null-Mifare支持,android,nfc,mifare,Android,Nfc,Mifare,1.ndef返回的对象总是null Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); Log.d(TAG, "onNewIntent: "+intent.getAction()); Toast.makeText(this, getString(R.string.message_tag_detected), Toast.LENGTH_SHORT).show(); Ndef ndef = Nd
ndef
返回的对象总是null
Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
Log.d(TAG, "onNewIntent: "+intent.getAction());
Toast.makeText(this, getString(R.string.message_tag_detected), Toast.LENGTH_SHORT).show();
Ndef ndef = Ndef.get(tag);
ndef.connect();
标记
对象返回为
TAG: Tech [android.nfc.tech.IsoDep, android.nfc.tech.NfcA, android.nfc.tech.NdefFormatable]
2.我有一张嵌入NFC的阿联酋居民身份证,这个代码可以用来扫描吗?是米法雷吗3.在playstore上使用NFC TagInfo应用程序,扫描结果会发出警告 您的设备不支持Mifare Classic
4.android是否完全支持Mifare?我无法在线找到源代码。
android.nfc.tech.Ndef
由于您使用的卡没有这个,因此,对象总是空的。
试着用一张在techlist中有android.nfc.tech.Ndef
的卡,你会得到这个对象android.nfc.tech.MifareClassic
,其中包含此技术的卡是MifareClassic卡getPackageManager().hasSystemFeature("com.nxp.mifare");
是否有此更新?尚未更新…是否能够使用NFC从阿联酋航空ID读取任何数据?