Interstitial
Integration
class MainActivity : Activity() {
private var interstitialAd: InterstitialAd? = null
override fun onCreate(savedInstanceState: Bundle?) {
...
interstitialAd = InterstitialAd(this, "<Wortise Ad Unit ID>").also {
it.loadAd()
}
}
override fun onDestroy() {
...
interstitialAd?.destroy()
}
fun showInterstitial() {
if (interstitialAd?.isAvailable == true) {
interstitialAd?.showAd(this)
}
}
}Listener configuration
Última actualización