简体   繁体   English

Android NFC意图没有被“调用”

[英]Android NFC intent not being “called”

I have an intent filter set up so that when ever any NFC tech is discovered it calls my activity. 我设置了一个意图过滤器,以便每当发现任何NFC技术时,它都会调用我的活动。 This works great when testing with my nexus 7, however when I tried it with my nexus 4 its not working. 在使用nexus 7进行测试时,这非常有用,但是当我使用nexus 4进行测试时,它不起作用。 It makes the noise as if the tag was discovered but there is no app to handle it. 它会发出噪音,就像发现了标签一样,但是没有应用程序可以处理它。

The intent is as fallows. 意图是休假。

<activity
        android:name=".NfcScanned"
        android:label="@string/title_activity_nfc_scanned" >
 <!-- Add a technology filter -->
 <intent-filter>
     <action android:name="android.nfc.action.TECH_DISCOVERED" />
      <category android:name="android.intent.category.DEFAULT" />
 </intent-filter>

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

Now I could post everything that is in my activity that handles the card scanning however it doesn't get that far, and it works perfectly with another device. 现在,我可以发布活动中处理卡扫描的所有内容,但是并不能解决所有问题,并且可以与其他设备完美配合。

As far as logcat I'm getting this somewhat intriguing error 至于logcat,我遇到了这个有趣的错误

01-23 00:16:02.343: E/BrcmNfcJni(894): nativeNfcTag_doDisconnect: tag already deactivated

Nexus 4 has a Broadcom NFC chip which does not support your NXP proprietary tag type. Nexus 4具有Broadcom NFC芯片,该芯片不支持您的NXP专有标签类型。 On the other hand, NXP's NFC chip in the Nexus 7 does support the NXP proprietary tag reading. 另一方面,Nexus 7中的NXP NFC芯片确实支持NXP专有标签读取。

Cf What NFC tags does the Nexus 7 Support? cf Nexus 7支持哪些NFC标签? (2012) (2012年)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM