Perfect unique_id for device except IMEI,Android_ID,WLAN Mac and Bluetooth address

自闭症网瘾萝莉.ら 提交于 2019-11-28 17:59:15

I have chosen to use Android_ID since It's not dependent on any hardware.

Build.SERIAL also dependent on availability of telephony that is in wifi only devices this Build.SERIAL won't work.

I have explained how other approaches are dependent upon the hardware availability in the question itself.

There is no such ID available on Android. You can generate your own, for example a random UUID and connect it to the user's account. This is what Kindle, Audible and other applications do to identify devices in a non-privacy-intrusive way.

Consider Google Analytics Mobile if you want to "track your users", http://www.google.com/analytics/mobile/

If you want to get closer to tracking a device you can combine the IDs above together in a hash-function. Bluetooth + wifi + android serial, and if any of them are null, you put a 0 in the hash, e.g. if there is no wifi mac addr. As you point out, you aren't guaranteed the id won't change. Unless the user is running a custom ROM, I would expect this computed ID to stay constant, though.

I think, you could use device serial ID (hardware serial number, not android id). You could seen it in device settings. In your code, you could get it by Build.SERIAL.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!