Menu

Customized Interstitial Ad

1. Description

Configure native ad sources using an Interstitial ad placement. (Note: Currently, only native self-rendering types are supported.)

View SDK Version Corresponding Supported Ad Source Types, Ad Networks, and Rendering Methods


2. How to Use

  1. Complete the configuration by referring to TopOn Backend Configuration Guide
  2. If you select TopOn SDK rendering when configuring in the TopOn backend, you do not need to add any extra code;
    If you select developer Self-Rendering, then before loading the ad you need to additionally call the ATInterstitial#setNativeAdCustomRender() method, as follows:
java Copy
ATInterstitial interstitialAd = new ATInterstitial(activity, "your placement id");
interstitialAd.setNativeAdCustomRender(new ATNativeAdCustomRender() {
    @Override
    public View getMediationViewFromNativeAd(ATNativeAdInfo mixNativeAd, ATAdInfo atAdInfo) {
        //You can render the ad materials returned by the SDK into a View according to your own needs and return it here
        //For details, refer to: https://github.com/toponteam/TPN-Android-Demo
        return MediationNativeAdUtil.getViewFromNativeAd(activity, mixNativeAd, atAdInfo, true);
    }
});
interstitialAd.load();
  1. Complete the configuration by referring to TopOn Backend Configuration Guide
  2. If you select TopOn SDK rendering when configuring in the TopOn backend, you do not need to add any extra code;
    If you select developer Self-Rendering, then before loading the ad you need to additionally call the TUInterstitial#setNativeAdCustomRender() method, as follows:
java Copy
TUInterstitial interstitialAd = new TUInterstitial(activity, "your placement id");
interstitialAd.setNativeAdCustomRender(new TUNativeAdCustomRender() {
    @Override
    public View getMediationViewFromNativeAd(TUNativeAdInfo mixNativeAd, TUAdInfo adInfo) {
        //You can render the ad materials returned by the SDK into a View according to your own needs and return it here
        //For details, refer to: https://github.com/toponteam/TPN-Android-Demo
        return MediationNativeAdUtil.getViewFromNativeAd(activity, mixNativeAd, adInfo, true);
    }
});
interstitialAd.load();

Note:

  • When the Developer Self-Rendering method is set in the TopOn dashboard, if the code does not implement self-rendering to return the ad View, it will default to using the TopOn SDK's built-in layout style for rendering.
  • When the Developer Self-Rendering method is set in the TopOn dashboard and the code implements self-rendering to return the ad View, the ad background will default to fully transparent; you need to implement the half-screen and full-screen effects yourself.
Previous
Interstitial Ads
Next
Splash Ads
Last modified: 2026-07-08Powered by