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.
Example
- Kotlin
- Java
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()
}
}
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;
import java.util.Map;
public class InterstitialActivity extends AppCompatActivity implements TeadsAdPlacementEventsDelegate {
private TeadsAdPlacementInterstitial interstitial;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// 1. Build the placement configuration — this 3-arg constructor is a real
// Java-visible overload generated for the config's trailing default parameters
TeadsAdPlacementInterstitialConfig config = new TeadsAdPlacementInterstitialConfig(
"https://yoursite.com/article",
"INT_APP_1", // Provided by your Teads account manager
"YOUR_INSTALLATION_KEY"
);
// 2. Create the placement — context MUST be an Activity
interstitial = new TeadsAdPlacementInterstitial(this, config, this);
// 3. Request the ad
interstitial.loadAd();
}
@Override
public void onPlacementEvent(TeadsAdPlacement<?, ?> placement, TeadsAdPlacementEventName event, Map<String, ?> data) {
// 4. Show the ad as soon as it's ready
if (event == TeadsAdPlacementEventName.READY) {
interstitial.show(this);
}
}
@Override
protected void 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
- ✅ Ensure Brand Safety is enabled
- ✅ Ensure you comply with privacy legal requirements (GDPR/CCPA/GPP)
- ✅ Comply with app-ads.txt
- ✅ Implement proper error handling
- ✅ Test with the PIDs in Test PIDs and Configurations