Skip to main content


Step 1.Prerequisites#

This document mainly introduces how to integrate Native Ads :

  • Use Android Studio 3.2 or later
  • minSdkVersion 16 or later
  • compileSdkVersion 28 or later
  • Recommended: Create your TradPlus Apps and get your AppId
  • Initialize the TradPlus SDK for Unity3DAndroid

Step 2 Import layout file#

Download the SDK compressed package, after decompression, import the res in the TradPlusSDK_Unity folder into the Assets file:

  • res:Layout files required for native ads
  • Where:res-->layout

Step 3.Integration#

//Create adUnitId from your App
//Method 1:Load an Ad and set up ads to pop up
//Method 2:Load an Ad and set up ads to pop up
//Set an Scenario Id
//You can hide or show an ad using setVisibility when an ad is Loaded
//You can show an ad After hide ad
//Close ad
// Called when the ad for the given adUnitId has loaded.
TradPlusManager.OnAdNativeLoadedEvent += OnAdNativeLoadedEvent;
// Called when the ad fails to load for the given adUnitId.
TradPlusManager.OnAdNativeFailedEvent += OnAdNativeFailedEvent;
// Called when a native ad is clicked.
TradPlusManager.OnAdNativeClickedEvent += OnAdNativeClickedEvent;
// Called when a native ad starts playing.
TradPlusManager.OnAdNativeExpandedEvent += OnAdNativeExpandedEvent;