【问题标题】:What intent-filter to read Type 2 Tag in Nexus S (Android)?在 Nexus S (Android) 中读取 Type 2 Tag 的意图过滤器是什么?
【发布时间】:2011-07-20 16:55:59
【问题描述】:

我有一个类型 2 的标签,带有 type="T" 的文本记录和一些文本。

让我尝试标记这个,我的活动显示在活动选择器中。 我的清单文件中有这段代码

     <activity android:name=".Layout1"
              android:label="@string/app_name">
    <intent-filter>
        <action android:name="android.nfc.action.NDEF_DISCOVERED"/>
         <data android:mimeType="mime/*" />
    </intent-filter>

为什么我抓不到标签??我不明白什么是 type="T"。谢谢大家的帮助

【问题讨论】:

    标签: android tags nfc


    【解决方案1】:

    我刚开始 android/NFC 编程。在我的代码中,还有:

    <uses-permission android:name="android.permission.NFC" android:required="true">
    </uses-permission>
    <uses-sdk android:minSdkVersion="10" />
    <intent-filter>
       <action android:name="android.nfc.action.TAG_DISCOVERED" />
       <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
    <intent-filter>
       <action android:name="android.nfc.action.TECH_DISCOVERED" />
       <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
    

    供您参考,希望对您有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-11-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-14
      • 1970-01-01
      • 1970-01-01
      • 2022-06-10
      相关资源
      最近更新 更多