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 = this

Request 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 .

The video is not muted by default, to change this please set configuration.muteOnStart to true.

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