What is the difference between android ID and device ID?
Here's how I obtain them:
String androidID = Settings.Secure.getString(MainActivity.this.getContentResolver(), Settings.Secure.ANDROID_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?
deviceIDworks for all versions of android. Will
androidIDwork for all versions?