gpt4 book ai didi

android - NFC Intent 过滤器 => I/NfcDispatcher(923) : Connect to a tech with a different handle

转载 作者:太空宇宙 更新时间:2023-11-03 13:30:29 25 4
gpt4 key购买 nike

我正在开发一个与某些 VCard 标签完美配合的 NFC 应用程序。

现在,我想使用客户发送给我的一些不同的标签。

Android 设备(Nexus 4 和 Galaxy Nexus)只是发出 NFC 蜂鸣声,但没有应用出现,也没有 Intent 选择器...

这是我的 Intent list 条目:

<activity
android:name=".ResultActivity"
android:label="Alcatel Scan"
android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen" >
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>

</activity>

这是我扫描标签时关联的 logcat:

12-28 12:29:35.599: D/ACDB-LOADER(164): ACDB -> send_afe_cal
12-28 12:29:35.609: D/NativeNfcTag(923): Connect to a tech with a different handle
12-28 12:29:35.619: D/alsa_ucm(164): Set mixer controls for HiFi Lowlatency enable 1
12-28 12:29:35.619: D/ALSAModule(164): Device value returned is hw:0,14
12-28 12:29:35.629: D/ALSAModule(164): setHardwareParams: reqBuffSize 1024 channels 2 sampleRate 48000
12-28 12:29:35.629: D/ALSAModule(164): setHardwareParams: buffer_size 2048, period_size 1024, period_cnt 2
12-28 12:29:35.639: D/NativeNfcTag(923): Check NDEF Failed - status = 3
12-28 12:29:35.639: D/NfcDispatcher(923): dispatch tag: TAG: Tech [android.nfc.tech.NfcV, android.nfc.tech.NdefFormatable] message: null
12-28 12:29:35.669: I/NfcDispatcher(923): no match

根据这一行:“连接到具有不同句柄的技术”我真的担心 Android 设备永远无法读取该标签。我错了吗?

非常感谢任何帮助

最佳答案

好的,这是正确的 Intent 过滤器:

<intent-filter>
<action android:name="android.nfc.action.TECH_DISCOVERED"/>
<meta-data android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="@xml/nfc_tech_filter" />
</intent-filter>

<intent-filter>
<action android:name="android.nfc.action.TAG_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>

关于android - NFC Intent 过滤器 => I/NfcDispatcher(923) : Connect to a tech with a different handle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14068896/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com