我怎样才能读取其他Android设备的NFC ID? [英] How can I read the NFC ID of another Android device?

查看:385
本文介绍了我怎样才能读取其他Android设备的NFC ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要交换(只读)从一个Android设备的NFC标签ID到另一个,但我不知道我是否应该使用对等网络模式或HCE模拟一个NFC标签。

I want to exchange (or only read) the NFC tag ID from one Android device to another but I don't know if I should use peer-to-peer mode or emulate an NFC tag with HCE.

如果我用HCE,是仿真标签ID独特之处?

If I use HCE, is the emulated tag ID unique?

什么是更好的选择,或者是有一个更简单的吗?

What is the better option or is there a simpler one?

推荐答案

无论是P2P还是HCE将为您提供一个唯一的ID,至少不是在我所知道的任何电话。随着P2P它要求在ATR交换的ID是随机的。与HCE仿真标签ID通常设置为08H加上一个随机数。有可能是API调用来设置,但我不知道这样的。但它使一个很大的意义,一个手机不能唯一地随便什么人读标识。

Neither P2P nor HCE will provide you a unique ID, least not on any phone I'm aware of. With P2P it's required that the ID exchanged in ATR is random. With HCE the emulated tag ID is usually set to 08h plus a random number. There may be API call to set but I'm not aware of such. But it makes a lot of sense that a phone can not be uniquely identified by just anyone reading.

这篇关于我怎样才能读取其他Android设备的NFC ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆