What is the difference between android ID and device ID?
Here's how I obtain them:
Android ID:
String androidID = Settings.Secure.getString(MainActivity.this.getContentResolver(),
Settings.Secure.ANDROID_ID);
Device ID:
String deviceID = ((TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE))
.getDeviceId()
I need to uniquely identify my android device. Using deviceID
needs the permission to "make and manage phone calls". While using androidID
doesn't. Therefore, I'm going with androidID
as I don't need any call-management privileges.
What is the exact difference between the two? If there's none, why are there two IDs?
Will both the ids reset if I factory reset my device?
I know
deviceID
works for all versions of android. WillandroidID
work for all versions?