是否有可能采用Android光束中的Andr​​oid设备和其他NFC设备之间?设备、有可能、光束、Andr

2023-09-05 11:03:16 作者:许你眉间

我想实现我的Andr​​oid应用程序和NFC功能的亭间的NFC通信。我读过的文档,我知道推的数据可以通过两种方式来完成:

I'd like to implement a NFC communication between my Android app and a NFC-enabled kiosk. I've read the documentation and I understand pushing data can be done in 2 ways:

经前台NDEF推动API级别10至13 在通过Android的光束从API级别14

我想我可以通过第一个解决方案做什么,我想,但我想知道是否有可能使用Android的光束在Android设备和非Android设备之间?

I think I can do what I want to via the first solution but I'd like to know if it's possible to use Android Beam between an android device and a non-android device?

感谢您的帮助,

罗曼

推荐答案

虽然功能的API 10之间的呼叫到13和API 14不同,实际的底层协议几乎是相同的。在这两种情况下,NFC的对等通信是通过使用LLCP。在API的10至13中,所使用的实际的数据传输协议是核电站。在API 14,SNEP被添加到这一点,但它会回落到核电站,而另一个设备不支持SNEP。

Although the function calls between API 10 to 13 and APi 14 differ, the actual underlying protocol is nearly the same. In both cases, NFC peer-to-peer communication is done using LLCP. In API 10 to 13, the actual data transfer protocol used is NPP. In API 14, SNEP is added to that, but it will fall back to NPP when the other device does not support SNEP.

所以,当你的非Android设备实现SNEP和/或NPP在LLCP,它可以传输数据,并从一个Android NFC设备接收数据。 SNEP和LLCP的读卡器设备的一些实施存在的,例如参见 https://github.com/grundid/nfctools 。

So when your non-Android device implements SNEP and/or NPP over LLCP, it can transfer data to and receive data from an Android NFC device. Several implementations of SNEP and LLCP for card reader devices exist, see for example https://github.com/grundid/nfctools.