全局设置
<ph type="x-smartling-placeholder">
以下全局函数可用于控制某些信息,
由移动广告 SDK 收集。
Google 移动广告 C++ SDK 使用发布商第一方 ID 来
利用从应用中收集的数据,投放更具相关性的个性化广告
用户正在使用的应用。
发布商第一方 ID 默认处于启用状态,但您可以使用
以下代码:
#include "firebase/gma.h"
firebase::gma::SetIsSameAppKeyEnabled(/*is_enabled=*/false);
崩溃报告(仅限 iOS)
Google 移动广告 C++ SDK 会检查 iOS 应用中发生的异常,并
如果它们是由 SDK 导致的,则记录它们。我们会收集这些例外情况
可以在将来的 SDK 版本中阻止此类行为。
崩溃报告默认处于启用状态。如果您不想看到与 SDK 相关的异常
进行录制,您可以调用
DisableSDKCrashReporting()
函数。调用此方法的最佳时机是
应用会启动:
#include “firebase/gma.h”
firebase::gma::DisableSDKCrashReporting();
Android 设备不支持崩溃报告。
就使用 Cookie 征得用户同意
如果您的应用在 Android 上有特殊要求,则可将可选的
SharedPreferences
gad_has_consent_for_cookies
。请参阅
就使用 Cookie 征得用户同意
部分。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-10。
[null,null,["最后更新时间 (UTC):2024-09-10。"],[[["The Google Mobile Ads C++ SDK is deprecated as of June 17, 2024 and will reach End-of-Maintenance on June 17, 2025, with no further updates or bug fixes after that date."],["Developers should consider using the iOS and Android SDKs from AdMob instead of the Google Mobile Ads C++ SDK."],["The SDK includes features like Publisher first-party ID (enabled by default) for personalized ads and crash reporting (iOS only, enabled by default)."],["Developers can control these features, including disabling Publisher first-party ID and crash reporting, using provided code snippets."],["For Android, specific consent requirements related to cookies can be addressed using SharedPreferences."]]],[]]