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
- Kotlin
- Java
import net.empower.mobile.ads.api.EMAManagerclass RewardActivity : AppCompatActivity() {override fun onCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)// Preload the rewarded adEMAManager.loadRewardedAd(zoneId = "YOUR_REWARDED_ZONE_ID")}// Called when user taps "Watch Ad" buttonfun 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:
- Kotlin
- Java
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 heregrantReward()}AdStatus.SKIPPED -> { /* User closed without completing - no reward */ }else -> {}}}})EMAManager.showRewarded(zoneId = "YOUR_REWARDED_ZONE_ID",activity = this,onComplete = {// Ad dismissed, reload for next timeEMAManager.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
REWARDEDstatus, notSKIPPED - Reload after use - Load a new ad after each display
Ad Status Reference
| 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 |