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.

Note: All ad status listeners are optional. The SDK handles ad loading and display automatically. Use listeners only if you need to track ad states for analytics, UI updates, or custom logic.


Loading a Rewarded Ad

import net.empower.mobile.ads.api.EMAManager
class RewardActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Preload the rewarded ad
EMAManager.loadRewardedAd(zoneId = "YOUR_REWARDED_ZONE_ID")
}
// Called when user taps "Watch Ad" button
fun onWatchAdClicked() {
EMAManager.showRewarded(
zoneId = "YOUR_REWARDED_ZONE_ID",
activity = this
)
}
}

Listening to Rewarded Status (Optional)

Use the listener if you need to track when the user earns a reward:

EMAManager.loadRewardedAd(
zoneId = "YOUR_REWARDED_ZONE_ID",
listener = object : AdStatusListener {
override fun rewardedStatusChanged(adStatus: AdStatus) {
when (adStatus) {
AdStatus.READY -> { /* Ad is ready to be shown */ }
AdStatus.REWARDED -> {
// User earned the reward - grant it here
grantReward()
}
AdStatus.SKIPPED -> { /* User closed without completing - no reward */ }
else -> {}
}
}
}
)
EMAManager.showRewarded(
zoneId = "YOUR_REWARDED_ZONE_ID",
activity = this,
onComplete = {
// Ad dismissed, reload for next time
EMAManager.loadRewardedAd(zoneId = "YOUR_REWARDED_ZONE_ID")
}
)

Best Practices

  • Clear value exchange - Clearly communicate what reward users will receive
  • User-initiated - Only show when users choose to watch
  • Grant rewards properly - Only grant rewards on REWARDED status, not SKIPPED
  • Reload after use - Load a new ad after each display

Ad Status Reference

StatusDescription
READYAd is loaded and ready to display
FAILEDAd failed to load
SHOWNAd is being displayed
COMPLETE_PLAYINGVideo finished playing
REWARDEDUser earned the reward
SKIPPEDUser closed without completing