Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/234.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 安卓O中的安卓ID_Android_Android Identifiers_Android 8.0 Oreo - Fatal编程技术网

Android 安卓O中的安卓ID

Android 安卓O中的安卓ID,android,android-identifiers,android-8.0-oreo,Android,Android Identifiers,Android 8.0 Oreo,我们使用以下代码获取唯一ID: String id = Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.ANDROID_ID); 在Android O更改指南中,我们可以看到以下几点: Android O对平台进行了以下与隐私相关的更改。 我对以上内容的理解是,现在Android_ID将是应用程序绑定的,而不是设备绑定的。然而,我对以下几点感到困惑: 对于在OT

我们使用以下代码获取唯一ID:

String id = Settings.Secure.getString(mContext.getContentResolver(),
                 Settings.Secure.ANDROID_ID);
在Android O更改指南中,我们可以看到以下几点:

Android O对平台进行了以下与隐私相关的更改。

我对以上内容的理解是,现在Android_ID将是应用程序绑定的,而不是设备绑定的。然而,我对以下几点感到困惑:

对于在OTA之前安装的应用程序,ANDROID_ID的值保持不变,除非先卸载然后重新安装。 如果您希望继续使用Android ID进行设备绑定免费试用保护,您可以这样做。确保包名称和签名匹配

1) 这是什么意思?除非重新安装我的应用程序,否则即使我们发送了更新,它也会继续使用传统的android_id

2) 如果您希望继续使用Android ID进行设备绑定免费试用保护,您可以这样做。确保软件包名称和签名匹配。注意:这是什么意思?

1)假设您的应用程序在N设备上安装时具有id
abc
。现在,当设备更新为O时,返回给您的设备id将继续是
abc
。但是,如果用户在升级到O之后卸载并重新安装应用程序,
ANDROID
将更改为其他值

另一方面,如果应用程序安装在O设备上,然后卸载并重新安装,
ANDROID
将保持不变

2) 这意味着只要包名和签名保持不变,
ANDROID\u ID
的值就会保持不变。如果您的应用程序在O设备上得到更新,并且签名发生更改,那么它也将保持不变


本质上,android现在将使用包名/签名在O上生成唯一标识符。

android文档没有明确说明具有不同包名但共享用户ID值并使用相同密钥签名的应用程序的android_ID值。在Nexus 5、Android O Beta 3上的测试表明,在本例中,两个应用程序的Android ID值也相同。

1现在很清楚,关于2:如果我的软件包名称和签名保持不变,那么即使卸载并重新安装了应用程序,Android_ID也会相同?或者会改变吗?是的,与1)相同的解释适用于此处。如果两个动作都发生在O上,那么它将保持不变。如果第一次发生在抱歉,请您解释:“如果两个操作都发生在O上,那么它将保持不变。如果第一次发生在上,并且包名/签名保持不变,那么即使卸载和重新安装也不会更改android_id。我的意思是,如果卸载(第一次操作)在运行N或更早版本的设备上发生,当设备运行时发生重新安装(第二个操作)
ANDROID
将更改。
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.