Rewarded Video
Integrate Rewarded Video ads
This guide shows you how to integrate rewarded video ads of RTBSDK into your app.
Create RTBRewardedVideoAd Instance
Create an instance of RTBRewardedVideoAd:
val rewardedVideo = RTBRewardedVideoAd(this)Listen to Callbacks
Through the use of RTBRewardedVideoDelegate, you can listen to the different callbacks.
rewardedVideo.delegate = thisRequest Ad
To load a rewarded video ad, you will need to pass an instance of RTBRewardedVideoRequestConfiguration with placementID and the bundleId. Please contact our support for getting the needed IDs.
val configuration = RTBRewardedVideoRequestConfiguration(placementId, bundleId)
configuration.sellerId = "<SELLERID>" // Optional
rewardedVideo.load(configuration)You will be notified about the loading success/failure through the RTBRewardedVideoDelegate .
Optional - set user targeting
You can pass user targeting data to each request, allowing ads to be more relevant to your audience. Each field in RTBUserTargeting is optional.
Show Ad
After the ad gets loaded, it can be presented by calling:
The currency of bidFloor and priceCPM parameters is USD.
Complete Code Example
Last updated