UMP ConsentStatus 在测试时总是 "NotRequired"

UMP ConsentStatus always "NotRequired" when testing

我已将 Google 的 UserMessagingPlatform 合并到我的 Android 项目中,以获得用户同意,以符合 AdMob 的 GDPR。

问题是当我在 phone 上测试时,ConsentStatus 总是 returns“NotRequired”。我已经尝试使用 Geography = DebugGeography.Eea 进行测试,但这没有任何区别。此外,由于我居住在 EEA/UK,因此不需要这样做。

我也试过卸载并重新安装应用程序并使用 Reset() 但这也不起作用。

表单状态始终为“可用”,当我在不检查 ConsentStatus 的情况下强制显示表单时,它工作正常(我已经检查并且它已在 AdMob 界面中注册为显示的消息)。

我正在为 UMP (https://www.nuget.org/packages/Xamarin.Google.UserMessagingPlatform/1.0.0) 使用 Xamarin 跨平台绑定。

Google 文档 https://developers.google.com/admob/ump/android/quick-start 仅提及以下内容作为示例,说明为什么同意不需要作为响应:

ConsentStatus.NOT_REQUIRED:不需要用户同意。例如,用户不在 EEA 或英国。

看起来这个问题是由于 Android 和 iOS 模块中所需案例的不同顺序造成的:

@Retention(RetentionPolicy.SOURCE)
    public @interface ConsentStatus {
        int UNKNOWN = 0;
        int NOT_REQUIRED = 1;
        int REQUIRED = 2;
        int OBTAINED = 3;
    }

typedef NS_ENUM(NSInteger, UMPConsentStatus) {
  UMPConsentStatusUnknown = 0,      ///< Unknown consent status.
  UMPConsentStatusRequired = 1,     ///< User consent required but not yet obtained.
  UMPConsentStatusNotRequired = 2,  ///< Consent not required.
  UMPConsentStatusObtained =
  3,  ///< User consent obtained, personalized vs non-personalized undefined.
};