Android 12 和 13 的定位要求
广告 ID
如果您的应用使用的是 IMA SDK 3.25.1 版或更高版本,则该 SDK 已
自动声明 com.google.android.gms.permission.AD_ID
权限
并能够在广告 ID 可用时随时获取。
对于使用 IMA SDK 版本 3.24.0 或更低版本,并且以 Android 13 为目标平台的应用,则必须在 AndroidManifest.xml
文件中添加 com.google.android.gms.permission.AD_ID
权限,Google 移动广告 SDK 才能访问广告 ID:
<manifest>
<application>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
...
</application>
<!-- For apps targeting Android 13 or higher & IMA SDK version 3.24.0 or lower -->
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
</manifest>
详细了解 com.google.android.gms.permission.AD_ID
权限
请参阅此
Play 管理中心
一篇文章。
应用组 ID
从 Android 12 设备开始,如果用户在其 Android 设置中选择停用广告个性化功能,Google Play 会将广告 ID 设为 0。Google Play
还引入了应用组 ID,
它提供了一种注重隐私保护的方式,可将一组用户的使用情况或操作关联起来
归属于同一组织所有的应用。
默认情况下,IMA 3.25.1 或更高版本包含应用组 ID SDK。应用组 ID
对于支持分析和欺诈等非广告用例至关重要
以便将广告 ID 清零。如需详细了解
应用组 ID 查看此信息
Android 开发者指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-10-18。
[null,null,["最后更新时间 (UTC):2024-10-18。"],[[["IMA SDK versions 3.25.1 and higher automatically declare the `com.google.android.gms.permission.AD_ID` permission, granting access to the Advertising ID when available."],["For apps using IMA SDK versions 3.24.0 or lower and targeting Android 13, you must manually add the `com.google.android.gms.permission.AD_ID` permission to your `AndroidManifest.xml` file to enable Google Mobile Ads SDK to access the Advertising ID."],["On Android 12 and later, Google Play zeroes out the Advertising ID when users opt out of personalization, introducing the App Set ID as a privacy-focused alternative for correlating app usage within the same organization."],["IMA SDK version 3.25.1 and higher includes the App Set ID SDK by default, supporting non-ads use cases like analytics and fraud prevention when the Advertising ID is unavailable."]]],["Apps using IMA SDK 3.25.1+ automatically declare and access the Advertising ID. Apps with IMA SDK 3.24.0 or lower, targeting Android 13, must add the `com.google.android.gms.permission.AD_ID` permission to their `AndroidManifest.xml`. Android 12+ devices will zero out the advertising ID if the user disables personalization. The App Set ID, included by default in IMA 3.25.1+, allows usage correlation across apps from the same organization when the advertising ID is zeroed.\n"]]