开发者

NFC P2P tap between android phones does not seem to work

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 f开发者_StackOverflow中文版or P2P tag transfer just doesn't work. I wonder if others are having the same issue.

Thanks

Riyaz


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜