Unique identifier for Android phone
I'm building Android application which needs to identify device by some unique number/string.
I've heard about ANDROID_ID but there are also reports that it can be the same on some phone models or even updates. Another thing is that it is recreated after factory reset or system reinstall. I can live with that although I would prefer if it stayed the same.
Is there another way to identify the phone without asking for more permissions? IMEI requires them(android.permission.READ_PHONE_STATE) but it can scare away users.
How Shazam does that? I know it iden开发者_开发知识库tifies the phone permanently (it remembers that I was a user before it introduced 5 tags a month restriction for new users) even though I completely reinstalled the system.
Why not create a GUID in a file in a well-known location and have that be your unique identifier? That way you have full control and without the need for any elevated permissions (except for file system access.)
精彩评论