Same ANDROID_ID in Oreo

一世执手 提交于 2019-12-05 03:55:05

Its behaving as intended.

As highlighted by you in the question:

As a result, apps with different signing keys running on the same device no longer see the same Android ID

When you use Android studio to build different APKs the debug signing key is same. As a consequence you would see same Android_ID

But when you use different PC, the debug signing key is different. Hence you see different Android_ID.

As other answers explain why you are getting same id for different apks, they are correct.

Best way to check this behaviour with creating two different certificates and sign your apk using these two certificate.


Summarizing to all your confusion, [From Changes to Device Identifiers in Android O]

  1. The ANDROID_ID value won't change on package uninstall/reinstall, as long as the package name and signing key are the same. Apps can rely on this value to maintain state across reinstalls.
  2. If an app was installed on a device running an earlier version of Android, the Android ID remains the same when the device is updated to Android O, unless the app is uninstalled and reinstalled.
  3. The Android ID value only changes if the device is factory reset or if the signing key rotates between uninstall and reinstall events.
  4. This change is only required for device manufacturers shipping with Google Play services and Advertising ID. Other device manufacturers may provide an alternative resettable ID or continue to provide ANDROID ID.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!