有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!


共 (2) 个答案

  1. # 1 楼答案

    This所以post包含一些代码,其中包含

    String type = ndefTag.getType();         // tag type
    

    看起来正是你需要的

  2. # 2 楼答案

    试试看

    String[] techs = tag.getTechList();
    for (String t : techs) {
      if ("com.android.nfc.tech.MifareClassic".equals(t)) {
        ... // it's MIFARE Classic
      }
      else if ("com.android.nfc.tech.MifareUltralight".equals(t)) {
        ... // it's MIFARE Ultralight
      }
    }