【问题标题】:Consent form is not loading when App was downloaded from Play Store从 Play 商店下载应用程序时未加载同意书
【发布时间】:2020-09-08 21:48:04
【问题描述】:

我已将同意书集成到我的应用中。 如果我在调试模式下运行应用程序,它将显示出来。 如果我构建并安装签名的 APK,将显示同意书。

如果我从 Play 商店下载该应用程序,我不会收到任何错误消息,并且会到达以下代码。无法访问consentInformation.request... 中的代码。

   consentInformation = ConsentInformation.getInstance(this);
   String[] publisherIds = {"pub-xxx"};
   consentInformation.requestConsentInfoUpdate(publisherIds, new ConsentInfoUpdateListener() {
      @Override
        public void onConsentInfoUpdated(ConsentStatus consentStatus) {
        **//*seems to be not reached**
        ...
        }
   }

因此不显示同意 - 但仅在从 Play 商店下载时显示。

是否有错误或遗漏了什么?

谢谢 GGK

【问题讨论】:

  • 所以我猜它只适用于调试模式而不是生产模式?能不能试试release APK看看问题是否依然存在
  • 不完全是..它在调试中运行。当我构建 APK 并将其安装在设备上时,它也可以工作。从 Play 商店下载应用时,它不运行

标签: android gdprconsentform


【解决方案1】:

无论出于何种原因:

minifyEnabled false
shrinkResources false 

解决了这个问题。更多见here AnswerID 1

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-11-11
    • 1970-01-01
    • 1970-01-01
    • 2019-12-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多