If you select TopOn SDK Rendering when configuring in the TopOn backend, you do not need to add extra code;
If you select Developer Self-Rendering, then call the ATSplashAd#setNativeAdCustomRender() method additionally before loading the ad, as follows:
javaCopy
ATSplashAd splashAd = new ATSplashAd(activity, "your placement id");
splashAd.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, false);
}
});
splashAd.load();
If you select TopOn SDK Rendering when configuring in the TopOn backend, you do not need to add extra code;
If you select Developer Self-Rendering, then call the TUSplashAd#setNativeAdCustomRender() method additionally before loading the ad, as follows:
javaCopy
TUSplashAd splashAd = new TUSplashAd(activity, "your placement id");
splashAd.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, false);
}
});
splashAd.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 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.
3. Ad Network Notes
● Meta
⚠️ Note
As required by the platform policy, it is recommended to reserve at least 25% of the area at the bottom of the ad display page as a non-ad area. As shown in the example below, the non-ad area at the bottom can display your own logo.