Search code examples
androidunique

Is android.os.Build.SERIAL 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.


Solution

  • 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.