val interstitialAd = AdropInterstitialAd(context, "YOUR_UNIT_ID")
interstitialAd.interstitialAdListener = object : AdropInterstitialAdListener {
override fun onAdReceived(ad: AdropInterstitialAd) {
Log.d("ADROP", "interstitial ad received ${ad.unitId}, ${ad.creativeId}")
ad.show()
}
override fun onAdFailedToReceive(ad: AdropInterstitialAd, errorCode: AdropErrorCode) {
Log.d("ADROP", "failed to receive $errorCode")
}
override fun onAdFailedToShowFullScreen(ad: AdropInterstitialAd, errorCode: AdropErrorCode) {
Log.d("ADROP", "failed to show full screen $errorCode")
}
...
}
interstitialAd.load()