Rewarded Video

Integrate rewarded video ads

Create placement

To create rewarded placement, call createRewardedPlacement method:

_aatKitBinding.createRewardedPlacement();

You can change the placement name if needed:

AATKitBinding.kt
    //Change placement name if needed
    private val rewardedPlacementName = "rewardedPlacement"
    private var rewardedPlacement: RewardedVideoPlacement? = null
AATKitBinding.swift
    //Change placement name if needed
    private let rewardedPlacementName = "rewardedPlacement"
    private var rewardedPlacement: AATRewardedVideoPlacement? = nil

Reload placement

Start auto-reloading placement by calling:

_aatKitBinding.startRewardedAutoReload();

Stop auto-reloading placement by calling:

_aatKitBinding.stopRewardedAutoReload();

Show placement

When rewarded video ad is loaded, you can show it:

_aatKitBinding.showRewarded();

Check if user earned incentive

When user watches ad, you will be notified that incentive is earned. Register callback to get AATKitReward object containing needed information:

    _aatKitBinding.onUserEarnedIncentive = (reward) {
      print("[Home Page] onUserEarnedIncentive "
          "placementName: ${reward.placementName} "
          "rewardName: ${reward.rewardName} "
          "rewardValue: ${reward.rewardValue} ");
    };

Last updated