Rewarded Ads
Rewarded ads let users opt-in to watch a video ad in exchange for an in-app reward (extra lives, premium content, virtual currency, etc.).
Each ad format uses a Zone ID to identify the ad placement. Zone IDs are configured in the Empower dashboard.
Load the rewarded ad in advance and show it when the user chooses to watch. Grant the reward only on the REWARDED status.
Loading a Rewarded Ad
Load the ad in advance, for example at app startup:
- Kotlin
- Java
EMAManager.loadRewardedAd(zoneId = "YOUR_REWARDED_ZONE_ID")
EMAManager.INSTANCE.loadRewardedAd("YOUR_REWARDED_ZONE_ID");
Showing a Rewarded Ad
Show the ad when the user chooses to watch:
- Kotlin
- Java
EMAManager.showRewarded(
zoneId = "YOUR_REWARDED_ZONE_ID",
activity = this
)
EMAManager.INSTANCE.showRewarded("YOUR_REWARDED_ZONE_ID", this);
Listening to Rewarded Status
The SDK loads and displays ads automatically, retries failed loads, and reloads the next ad after a show based on per-zone settings from the Empower dashboard. Do not build manual reload loops. Use the listener to grant the reward and to track ad states if you need them.
| Status | Description |
|---|---|
READY | Ad is loaded and ready to display |
FAILED | Ad failed to load |
SHOWN | Ad is being displayed |
COMPLETE_PLAYING | Video finished playing |
REWARDED | User earned the reward |
SKIPPED | User closed without completing |
Grant the reward when the status is REWARDED, not SKIPPED:
- Kotlin
- Java
EMAManager.loadRewardedAd(
zoneId = "YOUR_REWARDED_ZONE_ID",
listener = object : AdStatusListener {
override fun rewardedStatusChanged(adStatus: AdStatus) {
when (adStatus) {
AdStatus.REWARDED -> grantReward()
AdStatus.SKIPPED -> { }
else -> {}
}
}
}
)
EMAManager.INSTANCE.loadRewardedAd("YOUR_REWARDED_ZONE_ID",
new AdStatusListener() {
@Override
public void rewardedStatusChanged(AdStatus adStatus) {
switch (adStatus) {
case REWARDED:
grantReward();
break;
case SKIPPED:
break;
}
}
}
);