Interstitial Ads
Interstitial ads are full-screen ads that cover the interface. Display them at natural pause points in your app, such as between game levels or after completing a task.
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 an Interstitial Ad
Load interstitial ads in advance so they're ready when needed:
- Kotlin
- Java
import net.empower.mobile.ads.api.EMAManagerclass GameActivity : AppCompatActivity() {override fun onCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)// Preload the interstitial adEMAManager.loadInterstitialAd(zoneId = "YOUR_INTERSTITIAL_ZONE_ID")}// Call this at a natural break pointfun onLevelComplete() {EMAManager.showInterstitial(zoneId = "YOUR_INTERSTITIAL_ZONE_ID",activity = this)}}
Listening to Interstitial Status (Optional)
If you need to track interstitial status or handle the skip callback:
- Kotlin
- Java
EMAManager.loadInterstitialAd(zoneId = "YOUR_INTERSTITIAL_ZONE_ID",listener = object : AdStatusListener {override fun empowerInterstitialStatusChanged(adStatus: AdStatus) {when (adStatus) {AdStatus.READY -> { /* Ad is ready to be shown */ }AdStatus.FAILED -> { /* Ad failed to load */ }AdStatus.SHOWN -> { /* Ad is being displayed */ }AdStatus.SKIPPED -> { /* User dismissed the ad */ }else -> {}}}})EMAManager.showInterstitial(zoneId = "YOUR_INTERSTITIAL_ZONE_ID",activity = this,interstitialSkippedListener = {// User skipped or closed the adloadNextLevel()})
Best Practices
- Preload ads - Load ads before you need them for instant display
- Natural break points - Show ads at logical pauses (level complete, article end)
- Don't interrupt - Avoid showing during active gameplay or content consumption
- Frequency capping - The SDK respects server-configured frequency caps
Ad Status Reference
| Status | Description |
|---|---|
READY | Ad is loaded and ready to display |
FAILED | Ad failed to load |
SHOWN | Ad is being displayed |
SKIPPED | User dismissed the ad |
WILL_LEAVE | User clicked the ad (leaving app) |