我正在尝试定义一个 Intent 过滤器,它只会在我收到包含特定网站 URI 的 NDEF 消息时触发。
我的定义是这样的:
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:host="ta.bcntouch.com" />
</intent-filter>
但它不会那样触发。我也试过:
<data android:scheme="http"android:host="ta.bcntouch.com" />
没有运气。也只是默认值。删除元素将导致它触发。
这可以做到吗?Android 文档仅显示了在元素中使用 MIME 类型的示例.....
任何帮助表示赞赏。