I need to use a unique ID for an Android app and I thought the serial number for the device would be a good candidate. How do I retrieve the serial number of an Android devi
There is an excellent post on the Android Developer's Blog discussing this.
It recommends against using TelephonyManager.getDeviceId() as it doesn't work on Android devices which aren't phones such as tablets, it requires the READ_PHONE_STATE permission and it doesn't work reliably on all phones.
Instead you could use one of the following:
The post discusses the pros and cons of each and it's worth reading so you can work out which would be the best for your use.