SplashAds
#
Prerequisites- Android V10.0.1.1 / iOS 9.7.0 (Unity plugin V1.3.3) supports splash ad integration.
- When using multiple caches, developers need to control the consecutive display.
- Developers need to configure the splash activity in the manifest file.
#
1. Request AdsParameter Description
#
unitId: Ad unit ID created on TradPlus backend- Developers need to fill in correctly, for example: if there are spaces before and after unitId, the ad request will fail because the configuration cannot be retrieved.
#
TPSplashExtra: Additional Parameters- customMap: Set Segement related attribute parameters
- localParams: Set local parameters. Android only. Some ad platforms require specific parameters to be set.
#
2. Check for Available Ads- It is recommended to call this API to check if there are available ads before displaying an ad. Only call the show method if there are ads available.
- true indicates that there are available ads, false indicates that there are no available ads at the moment.
#
3. Enter Ad SceneParameter Description
#
sceneId: Ad scene ID (recommended)- Developers can create it on the TradPlus backend, located in: App Management - Ad Scenario.
- When entering the ad scene, pass in the sceneId, and when displaying the ad, sceneId should also be passed in, otherwise it will affect statistics.
#
4. Display Ads#
5. Listen for CallbacksParameter Description
adInfo: Ad unit ID, third-party ad platform, eCPM, and other information. Please refer to Android Callback Information and iOS Callback Information for details.
error: Error information for ad request failure and ad display failure. Please refer to Error Code and Error Information for details.