Android 手机之间的 NFC P2P 点击似乎不起作用
我为 Nexus-S Android 手机开发了一个使用 NFC 的 P2P 标签写入应用程序。
该标签包含打包在 NDEF 消息中的文本 NDEF 记录和 MIME NDEF 记录。enableForegroundNdefPush 用于启用从一部手机到另一部手机的 P2P 标签推送。两部手机均启用 NFC。
使用 2 部 Nexus-S 手机来测试该应用程序,一部用于写入,另一部用于读取。 我正在使用一部手机中的应用程序创建和写入标签。另一部手机用于通过 Nexus-S 附带的内置“标签”应用程序进行读取。其他应用程序(例如 NXP 的“TagWriter”应用程序)也经过了测试。
在大约 30 次测试中,只有两次我能够使用上述设置来读取标签。 其他时候,通过窃听手机进行 P2P 标签传输是行不通的。我想知道其他人是否也遇到同样的问题。
谢谢里亚兹
I have developed a P2P tag-writing app using NFC for Nexus-S android phones.
The tag contains a text NDEF record and a MIME NDEF record packaged in an NDEF message.The enableForegroundNdefPush is used to enable P2P tag push from one phone to the other.NFC is enabled in both phones.
2 Nexus-S phones are being used to test the app, one for writing and the other for reading.
I am creating and writing the tag using my app present in 1 phone.The other phone is used for reading via the in-built 'Tags' application that comes with the Nexus-S. Other apps like the 'TagWriter' app from NXP has also been tested with.
Out of around 30 tests, only twice, was I able to use the above setup to read the tag.
Other times, the tapping of phones for P2P tag transfer just doesn't work. I wonder if others are having the same issue.
Thanks
Riyaz
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你用什么接收P2P?
enableForegroundDispatch 或一般意图来确定标签?
如果使用enableForegroundDispatch,请小心,因为techfilter应该适合由正在编写标签的应用程序使用。
我个人从未在一条消息中使用两种不同类型的记录,但是,使用简单的文本 NDEF 消息就可以了。
-干杯,AA
For receiving the P2P, what are you using?
enableForegroundDispatch or general intents to determine the tags?
IF using enableForegroundDispatch, be careful as techfilter should be appropriate as being used by the app that is writing the tags.
I personally never used two different type of records within 1 message however, used simple text NDEF message it worked.
-Cheers,AA
前台推送和调度对我来说在两台 Nexus S 设备上相当可靠。曾经有一次前台调度失败的情况。我通过简单地拆下电池盖、检查并清洁(金属)NFC 天线连接并重新安装盖子,确保其紧密贴合,成功解决了该问题。
Foreground push and dispatch have worked for me reasonably reliably with two Nexus S devices. There was an occasion when foreground dispatch fails to work. I managed to resolve the issue by simply removing the battery cover, inspect and clean the (metal) NFC antenna connection and reinstall the cover, making sure it's a snug fit.