简体   繁体   English

Android NFC:获取通信设备详细信息

[英]Android NFC: Get communicating device details

I have an app which uses NFC (P2P NFC) to communicate between two android devices. 我有一个使用NFC(P2P NFC)在两个Android设备之间进行通信的应用程序。 App works fine. 应用工作正常。 I want to know if i can details other receiving device such as device id and type. 我想知道我是否可以详细说明其他接收设备,例如设备ID和类型。 how do i get which device is doing the NFC communication? 如何获得哪个设备正在执行NFC通信?

Thanks 谢谢

That cannot be done using the built-in Android NFC P2P functionality, doing only NFC communication. 仅使用NFC通信,无法使用内置的Android NFC P2P功能来完成此操作。 However if you use NFC to pair the devices, you could exchange that information using out-of-band channels, like bluetooth. 但是,如果使用NFC配对设备,则可以使用带外通道(如蓝牙)交换该信息。 Obiously you could add device type info to any NFC payload, but you would not really be getting that info via the NFC communication (protocols). 令人讨厌的是,您可以将设备类型信息添加到任何NFC有效负载中,但是您实际上并不会通过NFC通信(协议)来获取该信息。

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

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