【问题标题】:Custom native ads in android app安卓应用中的自定义原生广告
【发布时间】:2016-09-02 07:33:10
【问题描述】:

我的应用程序实现了 Google Ads SDK,并且我能够在应用程序中显示我的广告系列 - 所以我的广告模块完成了一半 :)

但是,除了处理从 Google DFP 投放的广告之外,我还需要处理来自外部 URL 的原生广告(广告详细信息将从我的服务器获取)。有什么方法可以配置 Google DFP 从我的自定义 URL 获取原生广告?我需要做一些类似于 VAST 广告请求的事情,我可以在其中提供广告网络的 URL,而 DFP 将完成剩下的工作(DFP 将处理广告网络和最终用户之间的请求)。

【问题讨论】:

  • 您找到从服务器获取原生广告的解决方案了吗?如果是,比怎么样??

标签: admob double-click google-dfp native-ads


【解决方案1】:

这可能会对您有所帮助:

AdLoader adLoader = new AdLoader.Builder(context, "/6499/example/native")
    .forAppInstallAd(new OnAppInstallAdLoadedListener() {
        @Override
        public void onAppInstallAdLoaded(NativeAppInstallAd appInstallAd) {
            // Show the app install ad.
        }
    })
    .forContentAd(new OnContentAdLoadedListener() {
        @Override
        public void onContentAdLoaded(NativeContentAd contentAd) {
            // Show the content ad.
        }
    })
    .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();

您可以找到完整的“教程”here

【讨论】:

  • 这部分我已经完成了:)。我正在寻找一种通过 DoubleClick 从我自己的广告服务器(使用 NAST 模板)投放广告的方法。
猜你喜欢
  • 1970-01-01
  • 2014-07-24
  • 1970-01-01
  • 2011-10-23
  • 1970-01-01
  • 2020-12-22
  • 1970-01-01
  • 1970-01-01
  • 2023-03-20
相关资源
最近更新 更多