Initialize the TradPlus SDK
#
Step 1.PrerequisitesThis document mainly introduces how to integrate TradPlus SDK.
- The supported ad formats are: Native Ads、Banner Ads, Interstitial Ads, Rewarded Video Ads
minSdkVersion
16 or latercompileSdkVersion
28 or later
#
Step 2.Import the TradPlus SDK- 1.Download the TradPlus Unity3dAndroid SDK
- 2.Android SDK Import Instructions
- 3.Optionally use Proguard
- 4.Initialize the SDK
#
Step 3.Download the TradPlus Unity3dAndroid SDK- 1.Enter the Packaging System of TradPlus SDK.Check the third-party ad platforms that need to be aggregated as shown below:
- 2.Select the Integrate to generate Gradle's integration code as shown below:
- 3.Select the SDK download link as shown below:
Download the SDK zip package.After decompression,the TradPlusSDK_Android folder will have the following contents:
- third-party_libs:You can obtain the SDK library files in this folder
- Use the androidX libraries:You can obtain the SDK library files about Pangle and Tencent GDT 's aar in this folder
- Use the original support libraries:You can obtain the SDK library files about Pangle , Tencent GDT and Vungle's aar in this folder
- unity_assets:You can obtain the
cs script
file - res:Aggregate the resources that the third-party Network SDK must import
#
Step 4.Android SDK Import Instructions#
Option 1.Editor 2019 and above configuration#
(1)Generate Gradle and AndroidManifest.xmlAs shown below,generate baseProjectTemplate.gradle、mainTemplate.gradle and AndroidManifest.xmlfile
#
(2)baseProjectTemplate.gradle configurationIn baseProjectTemplate.gradle file, you can import the TradPlus SDK and the third-party SDK platforms with a Gradle dependency that points to the Packaging System of TradPlus SDK.
For an example :
#
(2)mainTemplate.gradle configurationIn mainTemplate.gradle file, you can import the TradPlus SDK and the third-party SDK platforms with a Gradle dependency that points to the Packaging System of TradPlus SDK.
#
(3)AndroidManifest.xml configurationPlease following AndroidManifest.xml configuration file to configure.
#
Option 2.Editor 2018 configuration#
(1)Generate mainTemplate.gradle filePlease following the Packaging System of TradPlus SDK to configure
#
(2)Generate AndroidManifest.xml fileIn the installation directory of unity, you can find the default Manifest file of unity, and copy it to the same level directory where you generated mainTempate.gradle. Please following AndroidManifest.xml configuration file to configure.
#
Step 5.AndroidX ConfigurationGenerate gradleTemplate.properties file,as shown below:
In gradleTemplate.properties file, you need to add this:
Or you can add new SupportAndroidXGradlePropertiesBuildProcessor.cs files in the project’s Assets/Plugins/Editor :
#
Step 6.ProGuard ConfigurationAdd the following to your ProGuard configuration:
#
Step 7.Initialize the SDKInitialize TradPlus in the game launch class:
You can get "APPID" , as shown below: