A
A
Alexander Vasyuchenko2017-03-14 15:52:14
Android
Alexander Vasyuchenko, 2017-03-14 15:52:14

How to get a unique Android device ID?

Tell me how to get a unique identifier for an android device? I rummaged through a bunch of articles on the internet and everything is not 100% reliable
1. Build serial on some left devices always returns "0123456789ABCDEF"

Build.class.getField("SERIAL").get(null).toString()

2. Android id, as I understand it, is not constant and is valid until the next reboot
Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID)

3. IMEI code. Not all devices have it, but only those with a SIM card
4. MAC address. On the 6th version of android you can not get it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor, 2017-03-14
@DMGarikk

So this is one of the "chips" of android phones that it does not have a 100% unique immutable identifier

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question