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 RTBRewardedVideoAdarrow-up-right:

val rewardedVideo = RTBRewardedVideoAd(this)

Listen to Callbacks

Through the use of RTBRewardedVideoDelegatearrow-up-right, 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 RTBRewardedVideoRequestConfigurationarrow-up-right with placementID and the bundleId. Please contact our supportenvelope for getting the needed IDs.

val configuration = RTBRewardedVideoRequestConfiguration(<PLACEMENT_ID>, <BUNDLE_ID>)
configuration.sellerId = "<SELLERID>" // Optional
rewardedVideo.load(configuration)

You will be notified about the loading success/failure through the RTBRewardedVideoDelegatearrow-up-right .

circle-info

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 RTBUserTargetingarrow-up-right 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

arrow-up-right

Last updated