菜单

原生广告平台注意项

● Meta(Facebook)

  • MediaView:必须要把MediaView添加到布局上,否则会认为是无效展示
  • AdIconView:必须要把AdIconView添加到布局上,否则会认为是无效展示
  • 图标(角标):Meta角标不能被遮挡,Meta角标可通过ATNativePrepareInfo.setChoiceViewLayoutParams()控制

 

● Vungle

  • MediaView:必须要把MediaView添加到布局上,否则会认为是无效展示
  • AdIconView:必须要把AdIconView添加到布局上,否则会认为是无效展示

 

Inmobi:

  • MediaView:必须要把MediaView添加到布局上,否则会认为是无效展示

 

穿山甲,Pangle

  • 需确保创建ATNativeAdView实例时传入的是Activity

 

华为:

  • 华为提供"原生广告下载按钮控件"(参考华为原生广告下载按钮控件说明)提高应用下载类原生广告的下载转化效果。

Taku提供ATNativeMaterial#getAppDownloadButton()提供华为下载按钮控件接入,具体接入方式参考下方bindSelfRenderView示例代码。

public static void bindSelfRenderView(Context context, ATNativeMaterial adMaterial,
     View selfRenderView, ATNativePrepareInfo nativePrepareInfo) {
     ......
    // AppDownloadButton(Only Huawei Ads support)
    View lastView = ((ViewGroup) selfRenderView).getChildAt(((ViewGroup) selfRenderView).getChildCount() - 1);
    // Remove AppDownloadButton since last time added
    if (lastView instanceof AppDownloadButton) {
        ((ViewGroup) selfRenderView).removeView(lastView);
    }
    //View appDownloadButton = adMaterial.getAppDownloadButton();
   //v6.3.70或以上版本               
    View appDownloadButton = adMaterial.getCallToActionButton();
    if (appDownloadButton != null) {
        if (appDownloadButton instanceof AppDownloadButton) {
            ((AppDownloadButton) appDownloadButton).setTextSize(dip2px(context, 12));
            appDownloadButton.setPadding(dip2px(context, 46),dip2px(context, 24),dip2px(context, 46),dip2px(context, 24));//调整按钮大小
        }
        ViewGroup.LayoutParams ctaParams = ctaView.getLayoutParams();
        ((ViewGroup) selfRenderView).addView(appDownloadButton, ctaParams);
        appDownloadButton.setVisibility(View.VISIBLE);
        ctaView.setVisibility(View.INVISIBLE);
    }
}

注意:getAppDownloadButton()可能返回null,接入时需要进行判空处理;点击AppDownloadButton不会触发onAdClicked回调,但不会影响收益;

 

Bigo:

  • AdIconView:返回不为空时必须要把AdIconView添加到布局上,否则会认为是无效展示

 

Yandex:

  • Domain:返回不为空时需要把文案添加在布局上并调用ATNativePrepareInfo.setDomainView()进行绑定,否则会认为是无效展示
  • Warning:返回不为空时需要把文案添加在布局上并调用ATNativePrepareInfo.setWarningView()进行绑定,否则会认为是无效展示
  • AdFrom:返回不为空时需要把文案添加在布局上并调用ATNativePrepareInfo.setAdFromView()进行绑定,否则会认为是无效展示
上一个
自渲染广告
下一个
自渲染滑一滑
最近修改: 2025-05-30Powered by