An AdPlayerTag
may be presented as interstitial. To do so, use the following API:
Info |
---|
See Obtaining AdPlayerTag Instance for information on obtaining an |
Kotlin
Code Block | ||
---|---|---|
| ||
tag.asInterstitial() .withConfiguration { backgroundColor = Color.WHITE noAdTimeoutSec = 10 dismissOnBack = true } .onDismissed { // do dismiss action } .launch() |
Java
Code Block | ||
---|---|---|
| ||
AdPlayerInterstitialConfiguration configuration = new AdPlayerInterstitialConfiguration( Color.WHITE, // backgroundColor 10, // noAdTimeoutSec true // dismissOnBack ); tag.asInterstitial() .withConfiguration(configuration) .onDismissonDismissed(() -> { // do dismiss action }) .launch(); |
All the configuration values as well as the dismiss listener are optional.
Note |
---|
If a background color is set, it should be the same background color as provided during initialization ( |