简体   繁体   English

如何获得唯一的固定NFC ID?

[英]How to get unique fixed NFC ID?

Is there any way to get some device id or unique & fixed id on P2P communication through NFC devices?有什么方法可以通过 NFC 设备在 P2P 通信中获取一些设备 ID 或唯一且固定的 ID?

I'm trying to get some unique id which I can check later if that was the same device or not.我正在尝试获取一些唯一的 ID,我可以稍后检查它是否是同一设备。 Right now I'm getting random id on each tap which is very difficult to identified the same device.现在,我在每次点击时都会获得随机 id,这很难识别同一设备。

Thanks, Gaurav Kapoor谢谢,高拉夫卡普尔

On Android not unless you install your own App that does Host Card Emulation and returns a unique ID.在 Android 上,除非您安装自己的应用程序,该应用程序执行主机卡仿真并返回唯一 ID。

For NFC the ID is designed only to prevent card clash when 2 Cards are presented to a NFC reader at the same time and thus don't need to be unique, just likely to be different and does not need to be static.对于 NFC,ID 仅用于防止 2 张卡同时呈现给 NFC 读卡器时发生卡冲突,因此不需要是唯一的,只是可能不同并且不需要是 static。

Thus Android OS generates a random number each time as a security precaution against it being used to track phones.因此,Android OS 每次都会生成一个随机数,作为防止其被用于跟踪手机的安全预防措施。

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

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