StandNative
#
Step 1.PrerequisitesThis 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 Android
#
Step 2.Integration#
2.1 Add AdView to the layoutStart by including this XML block to your Activity’s or Fragment’s layout.
#
(1)V6.X New API#
(2)V5.X Old API#
2.2 Create an Ad#
(1)V6.X New API#
(2)V5.X Old API- How to create Add Unit , as shown below:
- After add Add Unit, you can get
adUnitId
, as shown below:
#
2.3 Implement Event Listeners#
(1)V6.X New API#
(2)V5.X Old API#
2.4 Load an Ad#
(1)V6.X New API#
(2)V5.X Old API#
2.5 Show an Ad#
(1)V6.X New API- V5.X Old API
After the ad is loaded successfully, it will be automatically populated into the layout.