解读用户意见征求模式值
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
UMP SDK 可以解读 Google 意见征求模式的 GDPR 用户意见征求选择。
UMP SDK 会解读以下用途:
- 广告存储
- 广告个性化
- 广告用户数据
- Google Analytics 存储空间
对于需要征得用户同意才能使用 Google 产品的应用,了解意见征求模式值非常有用。
准备工作
开始使用
在 AdMob 界面中启用意见征求模式。如需了解详情,请参阅管理意见征求模式设置。
使用 UMP SDK 3.2.0 版(Android)或 3.0.0 版(iOS)或更高版本。
在启动 UMP SDK 之前,请先初始化 Firebase。如需了解详情,请参阅将 Analytics SDK 添加到您的应用。
设置默认同意情况
当欧盟 (EU) 法规适用于用户时,UMP SDK 会更新同意情况。
在欧盟法规不适用于用户时,设置默认同意情况 (Android | iOS)。
使用基本模式
如需使用基本模式,请参阅意见征求模式基本模式支持。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-25。
[null,null,["最后更新时间 (UTC):2025-08-25。"],[],[],null,["# Interpret consent mode values\n\nSelect platform: [Android](/admob/android/privacy/consent-mode \"View this page for the Android platform docs.\") [iOS](/admob/ios/privacy/consent-mode \"View this page for the iOS platform docs.\") [Flutter](/admob/flutter/privacy/consent-mode \"View this page for the Flutter platform docs.\")\n\n\u003cbr /\u003e\n\nThe UMP SDK can interpret GDPR consent choices for Google\n\n[Consent Mode](//support.google.com/admob/answer/10114014#consentmode).\n\nThe UMP SDK interprets the following purposes:\n\n- ad storage\n- ad personalization\n- ad user data\n- analytics storage\n\nInterpreting consent mode values is useful for apps that get consent for the use\nof your products.\n\nBefore you begin\n----------------\n\n- Make sure you are using the [Google Analytics for Firebase SDK](//firebase.google.com/docs/analytics) in your app.\n- Choose [Basic versus advanced consent mode](//developers.google.com/tag-platform/security/concepts/consent-mode#basic-vs-advanced). Google supports advanced mode by default, while basic mode has additional steps.\n\nGet started\n-----------\n\n1. Turn on consent mode in the AdMob UI. For more details, see\n\n [Manage consent mode settings](//support.google.com/admob/answer/16053245).\n\n2. Use UMP SDK version 3.2.0 (Android) or 3.0.0 (iOS) or higher.\n\n3. Initialize Firebase before starting the UMP SDK. For more details, see\n\n [Add the Analytics SDK to your app](//firebase.google.com/docs/analytics/get-started?platform=flutter#add-sdk).\n\nSet default consent state\n-------------------------\n\nThe UMP SDK updates the consent state when European Union (EU) regulations\napply to the user.\n\nSet the default consent state ([Android](//developers.google.com/tag-platform/security/guides/app-consent?consentmode=basic&platform=android#default-consent) \\| [iOS](//developers.google.com/tag-platform/security/guides/app-consent?consentmode=basic&platform=ios#default-consent))\n\nwhen EU regulations don't apply to the user.\n\nUse basic mode\n--------------\n\nTo use basic mode, see [Consent mode basic mode support](//developers.google.com/funding-choices/fc-sdks#consent_mode_basic_mode_support)."]]