Menu

Things to note about native advertising platforms

Notes

Meta (Facebook):

MediaView:MediaView must be added to the layout, otherwise it will be considered an invalid display (except for native banner ads (self-rendering))

AdIconView:AdIconView must be added to the layout, otherwise it will Considered an invalid display

Icon (corner Mark):Meta marker cannot be blocked. Meta marker can be passed ATNativePrepareInfo.setChoiceViewLayoutParams() control

Vungle:

MediaView:MediaView must be added to the layout. Otherwise, it will be considered an invalid display

AdIconView :AdIconView must be added to the layout, otherwise it will be considered an invalid display

Inmobi:

MediaView:MediaView must be added to the layout. Otherwise, it will be considered an invalid display

Pangolin, Pangle:

Huawei:

•Huawei provides "Native Advertising Download Button Control" (refer to Huawei's native ad download button control description) to improve the performance of native advertising for app downloads. Download conversion effects. Taku provides ATNativeMaterial#getAppDownloadButton() to provide Huawei download button control access. For specific access methods, refer to the bindSelfRenderView sample code below.

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();
    if (appDownloadButton != null) {
        if (appDownloadButton instanceof AppDownloadButton) {
            ((AppDownloadButton) appDownloadButton).setTextSize(dip2px(context, 12));
        }
        ViewGroup.LayoutParams ctaParams = ctaView.getLayoutParams();
        ((ViewGroup) selfRenderView).addView(appDownloadButton, ctaParams);
        appDownloadButton.setVisibility(View.VISIBLE);
        ctaView.setVisibility(View.INVISIBLE);
    }
}

Note: getAppDownloadButton() may return null, which needs to be performed when accessing Empty processing; clicking the AppDownloadButton will not trigger the onAdClicked callback, but will not affect the revenue;

Bigo:

•AdIconView: When the return is not empty, AdIconView must be added to the layout on, otherwise it will be considered an invalid display

Yandex:

•Domain: When the return is not empty, you need to add the copy to the layout and call ATNativePrepareInfo.setDomainView() Binding, otherwise it will be considered invalid Display

•Warning: When the return is not empty, you need to add the copy to the layout and call ATNativePrepareInfo.setWarningView() for binding, otherwise it will be considered an invalid display


Previous
self-rendering ads
Next
Self-rendering shake
Last modified: 2025-05-30Powered by