Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is android.os.Build.SERIAL unique?

Tags:

android

unique

I would like to use a unique id for android device that works for phone and Tablet. (IMEI doesn't work with no SIM card device and sometime MAC Address return null)

I'm not sure is android.os.Build.SERIAL unique or not.

Does anyone know about this?

Thanks, Regards.

like image 973
Jutikorn Avatar asked Nov 20 '12 10:11

Jutikorn


People also ask

Is Android serial number unique?

Your device's serial number is a unique code that the manufacturer gives the phone. No two serial numbers are the same. Should you need to find your phone's, there are a few places you can look. A serial number is usually a combination of letter and numbers.

What is Android OS Build ID?

The build ID provides information such as the platform release, code branch, and date the release was branched from or synced with the development branch. Note: To download factory images, drivers, and full OTA images for Nexus and Pixel devices, refer to the Android Developer site.

What is an Android build?

The Android build system compiles app resources and source code, and packages them into APKs or Android App Bundles that you can test, deploy, sign, and distribute.

What is build fingerprint?

android.os.Build.FINGERPRINT: A string that uniquely identifies this build. It SHOULD be reasonably human-readable.


2 Answers

Yes, but note that it was only added in API level 9, and it may not be present on all devices. To get a unique ID on earlier platforms, you'll need to read something like the MAC address or IMEI.

Generally, try reading all the possible IDs, and use whichever are available. See this article for guidance.

like image 155
Graham Borland Avatar answered Sep 21 '22 15:09

Graham Borland


You can use Build serial and android ID to make your own unique id.

String serial =    Build.SERIAL; String android_id =Secure.getString(context.getContentResolver(),                    Secure.ANDROID_ID);  String myKey=serial +android_id ; 
like image 36
san88 Avatar answered Sep 21 '22 15:09

san88