Rewarded Ads
#
1.Request AdsParameter Description
#
unitId:Ad unit ID created on the TradPlus platform.- The developer needs to fill in correctly, for example, if there are spaces before and after the unitId setting, it will cause the ad to fail to request due to failure to retrieve the configuration.
#
TPRewardVideoExtra:Extra Parameters- customMap: Set Segement related attribute parameters
- localParams:Set local parameters.Only for Android.Some ad platforms require special parameters to be set.
- userId & customData:parameters required for Server Reward Verification .Without using server incentives, you can directly pass an
empty
string.
#
2.Checking 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.Entering Ad Scene (Optional)Parameter Description
#
sceneId :Ad Scene ID- Developers can create an ad scene in TradPlus backend. The location is as follows: Application Management - Advertising Scenes.
- When entering the advertising scene, pass in the sceneId. The sceneId must also be passed in when displaying the ad, 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.
Error information for ad request failure and ad display failure. Please refer to Error Codes.