我们使用以下代码来获取唯一的ID:
在Android O的变更指南中,我们可以看到以下内容:
Android O对平台进行了以下与隐私相关的变更。 https://developer.android.com/preview/behavior-changes.html
我的理解是,现在的Android_ID将会与应用程序绑定而不是设备绑定。但下面这个点让我感到困惑:
对于在OTA之前已安装的应用程序,ANDROID_ID的值仍然保持不变,除非卸载然后重新安装。 如果您希望继续使用Android ID来实现基于设备的免费试用保护,则可以这样做。请确保包名称和签名匹配。
1)这是什么意思?即使我们发送更新,除非我的应用程序被重新安装,否则它将继续拥有传统的android_id?
2)如果您希望继续使用Android ID来实现基于设备的免费试用保护,则可以这样做。请确保包名称和签名匹配:这是什么意思?
String id = Settings.Secure.getString(mContext.getContentResolver(),
Settings.Secure.ANDROID_ID);
在Android O的变更指南中,我们可以看到以下内容:
Android O对平台进行了以下与隐私相关的变更。 https://developer.android.com/preview/behavior-changes.html
The platform now handles identifiers differently.
Values of ANDROID_ID are now scoped per-app instead of per-user. The value of ANDROID_ID is unique for each combination of application package name, signature, user, and device. Two apps running on the same device no longer see the same Android ID, and so cannot correlate.
The value of ANDROID_ID does not change on package uninstall or reinstall, as long as the package name and signing key are the same.
The value of ANDROID_ID does not change if the package signing key changes due to an update.
For apps that were installed prior to the OTA, the value of ANDROID_ID remains the same unless uninstalled and then reinstalled.
If you wish to continue using Android ID for device-bound free trial protection, you can do so. Make sure that the package name and signature match.
For a simple, standard system to monetize apps, use Advertising ID. Advertising ID is a unique, user-resettable ID for advertising, provided by Google Play services.
我的理解是,现在的Android_ID将会与应用程序绑定而不是设备绑定。但下面这个点让我感到困惑:
对于在OTA之前已安装的应用程序,ANDROID_ID的值仍然保持不变,除非卸载然后重新安装。 如果您希望继续使用Android ID来实现基于设备的免费试用保护,则可以这样做。请确保包名称和签名匹配。
1)这是什么意思?即使我们发送更新,除非我的应用程序被重新安装,否则它将继续拥有传统的android_id?
2)如果您希望继续使用Android ID来实现基于设备的免费试用保护,则可以这样做。请确保包名称和签名匹配:这是什么意思?
ANDROID_ID
将会改变。 - ashkhn