Interstitial - Android

An AdPlayerTag may be presented as interstitial. To do so, use the following API:

See Obtaining AdPlayerTag Instance for information on obtaining an AdPlayrerTag instance.

Kotlin

tag.asInterstitial() .withConfiguration { backgroundColor = Color.WHITE noAdTimeoutSec = 10 dismissOnBack = true } .onDismissed { // do dismiss action } .launch()

Java

AdPlayerInterstitialConfiguration configuration = new AdPlayerInterstitialConfiguration( Color.WHITE, // backgroundColor 10, // noAdTimeoutSec true // dismissOnBack ); tag.asInterstitial() .withConfiguration(configuration) .onDismissed(() -> { // do dismiss action }) .launch();

All the configuration values as well as the dismiss listener are optional.

If a background color is set, it should be the same background color as provided during initialization (AdPlayer.initializePublisher).