我一直在阅读有关android没有唯一标识符的stackoverflow上的一些帖子.但我不能将设备的MAC地址用作唯一ID吗?如果没有,为什么不呢?如果是的话,是否有人知道如何以编程方式获取它(即一段代码[请])?
供参考:
我的应用程序需要网络,因此没有网络的设备将无法安装它.
解决方法:
But Could I not use the MAC address of the device as a unique ID?
不是100%可靠.
If not, why not?
Here is what Google has to say on the subject:
It may be possible to retrIEve a Mac address from a device’s WiFi or Bluetooth harDWare. We do not recommend using this as a unique IDentifIEr. To start with, not all devices have WiFi. Also, if the WiFi is not turned on, the harDWare may not report the Mac address.
此外,您假设所有设备都将通过某种方式准确地报告MAC地址.我认为自定义ROM,也许是有根设备,可能会欺骗MAC地址.这可能是也可能不是你的担忧 – 我只是指出来.
My app requires network
充其量,它可能需要WiFi.它不能要求打开WiFi.
does anyone kNow how to get it programmatically (i.e. a pIEce of code [please])?
见this answer.
总结以上是内存溢出为你收集整理的使用android MAC地址作为唯一标识符全部内容,希望文章能够帮你解决使用android MAC地址作为唯一标识符所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)