【问题标题】:AdLoader always loads content adAdLoader 始终加载内容广告
【发布时间】:2016-09-29 11:12:01
【问题描述】:

我为我的应用程序创建了一个自定义 AdLoader。但它总是加载内容广告,从不安装广告。如果我删除.forContentAd,我会收到安装广告,但如果我同时离开,我只会收到内容广告。谁能告诉我为什么?

这是我的代码:

 new AdLoader.Builder(activityContext, getString(R.string.test_admob_unit_id))
                .forContentAd(new NativeContentAd.OnContentAdLoadedListener() {
                    @Override
                    public void onContentAdLoaded(NativeContentAd contentAd) {
                        adQueue.add(contentAd);
                    }
                })
                .forAppInstallAd(new NativeAppInstallAd.OnAppInstallAdLoadedListener() {
                    @Override
                    public void onAppInstallAdLoaded(NativeAppInstallAd appInstallAd) {
                        adQueue.add(appInstallAd);
                    }
                })

            .withAdListener(new AdListener() {
                @Override
                public void onAdFailedToLoad(int errorCode) {
                    // Handle the failure by logging, altering the UI, etc.
                }
            })
            .withNativeAdOptions(new NativeAdOptions.Builder()
                    // Methods in the NativeAdOptions.Builder class can be
                    // used here to specify individual options settings.
                    .build())
        .build();

【问题讨论】:

    标签: android admob native-ads


    【解决方案1】:

    是的,我可以告诉你原因。

    当您提出请求时,AdMob 的服务器将始终尝试选择最能为您带来收益的广告。他们通过进行拍卖来做到这一点,在该拍卖中,不同的广告客户的广告系列竞争成为您应用中展示的广告系列。大多数高收入广告都可能集中在一种格式中(尤其是在世界某些地区)。这可以使您在一种类型的行中看到一百个或更多广告。这是完全正常的,这只是您所在地区的广告客户想要购买一种类型的广告而不是另一种的结果。

    我没有发现您的 AdLoader 代码有任何问题,而且由于您确实在您注释掉 forContentAd() 时看到了应用安装广告,我不相信您在做任何事情错误的。只有一堆内容广告等待在您的附近展示。 :)

    【讨论】:

      猜你喜欢
      • 2023-04-08
      • 2019-03-12
      • 1970-01-01
      • 2013-01-09
      • 1970-01-01
      • 2016-11-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多