Skip to main content

Interstitial Placement

Interstitial placements display fullscreen ads at natural transition points in your app.


Sample App

The official Teads SDK sample application includes working examples of this format. Use it for implementation examples and as a reference while you set up this placement.

Teads Android Sample App on GitHub

Example​

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import tv.teads.sdk.combinedsdk.TeadsAdPlacementEventName
import tv.teads.sdk.combinedsdk.adplacement.TeadsAdPlacementInterstitial
import tv.teads.sdk.combinedsdk.adplacement.config.TeadsAdPlacementInterstitialConfig
import tv.teads.sdk.combinedsdk.adplacement.interfaces.TeadsAdPlacementEventsDelegate
import tv.teads.sdk.combinedsdk.adplacement.interfaces.core.TeadsAdPlacement

class InterstitialActivity : AppCompatActivity(), TeadsAdPlacementEventsDelegate {

private var interstitial: TeadsAdPlacementInterstitial? = null

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

// 1. Build the placement configuration
val config = TeadsAdPlacementInterstitialConfig(
articleUrl = "https://yoursite.com/article",
widgetId = "INT_APP_1", // Provided by your Teads account manager
installationKey = "YOUR_INSTALLATION_KEY"
)

// 2. Create the placement — context MUST be an Activity
interstitial = TeadsAdPlacementInterstitial(this, config, this)

// 3. Request the ad
interstitial?.loadAd()
}

override fun onPlacementEvent(
placement: TeadsAdPlacement<*, *>,
event: TeadsAdPlacementEventName,
data: Map<String, Any>?
) {
// 4. Show the ad as soon as it's ready
if (event == TeadsAdPlacementEventName.READY) {
interstitial?.show(this)
}
}

override fun onDestroy() {
super.onDestroy()
interstitial?.clean()
}
}

Best Practices​

Do not open the click URL

The SDK opens the click URL. Do not navigate in this handler or the browser will open twice. Use the event for tracking only.

Ad Lifecycle Listener​

Implement TeadsAdPlacementEventsDelegate to observe playback, clicks, and viewability. See Placement Events Listener for the full event reference and error handling guide.

Checklist​