Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Info

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

Kotlin

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

Java

Code Block
languagejava
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 (AdPlayer.initializePublisher).