![](https://csdnimg.cn/release/download_crawler_static/14968172/bg4.jpg)
TagInfo tagInfo =
getIntent().getParcelableExtra(NfcController.EXTRA_TAG_INFO);
// 查询 Tag 设备支持的技术或协议,返回值为支持的技术或协议列表
int[] profiles = tagInfo.getTagSupportedProfiles();
// 查询是否支持 NfcA,若支持,构造一个 NfcATag
boolean isSupportedNfcA =
tagInfo.isProfileSupported(TagManager.NFC_A);
if (isSupportedNfcA) {
NfcATag tagNfcA = NfcATag.getInstance(tagInfo);
}
// 查询是否支持 NfcB,若支持,构造一个 NfcBTag
boolean isSupportedNfcB =
tagInfo.isProfileSupported(TagManager.NFC_B);
if (isSupportedNfcB) {
NfcBTag tagNfcB = NfcBTag.getInstance(tagInfo);
}
// 查询是否支持 IsoDep,若支持,构造一个 IsoDepTag
boolean isSupportedIsoDep =
tagInfo.isProfileSupported(TagManager.ISO_DEP);
if (isSupportedIsoDep) {
IsoDepTag tagIsoDep = new IsoDepTag(mTagInfo);
}
// 查询是否支持 NDEF,若支持,构造一个 NdefTag
boolean isSupportedNdefDep =
tagInfo.isProfileSupported(TagManager.NDEF);
if (isSupportedNdefDep) {
NdefTag tagNdef = new NdefTag(mTagInfo);
}
// 查询是否支持 MifareClassic,若支持,构造一个 MifareClassicTag
boolean isSupportedMifareClassic =
tagInfo.isProfileSupported(TagManager.MIFARE_CLASSIC);
if (isSupportedMifareClassic) {
MifareClassicTag mifareClassicTag =
MifareClassicTag.getInstance(tagInfo);
}
// 查询是否支持 MifareUltralight,若支持,构造一个 MifareUltralightTag
boolean isSupportedMifareUltralight =