Variety of ways to retrieve device id in Android.
Given below are the different types of identifying devices ID in android devices.
- Unique number (IMEI, MEID, ESN, IMSI)
- MAC Address
- Serial Number
- ANDROID_ID
- IMEI( International Mobile Equipment Identity )
- MEID(Mobile Equipment IDentifier)
- ESN(Electronic Serial Number)
- IMSI(International Mobile Subscriber Identity)
To get the device Id, you can use TelephonyManager object by returning a corresponding system service(TELEPHONY_SERVICE) to it.
TelephonyManager tm = (TelephonyManager) context
.getSystemService(Context.TELEPHONY_SERVICE);
deviceId = tm.getDeviceId();
Can see more way to get Device Id from Samsung Developer site.