...
Code Block | ||
---|---|---|
| ||
#MainActivity.kt->onCreate() val interstitialConfigId = ConfigBuilder.INTERSTITIAL_TEST_R89_CONFIG_ID val activityToShowOver = this var interstitialId = RefineryAdFactoryR89AdFactory.createInterstitial( interstitialConfigId, activityToShowOver, afterInterstitial = { // Here you could load the next activity or fragment. Basically recover app flow Log.d("Interstitial", "After Interstitial") //Example val newActivityIntent = Intent(this, NewActivity::class.java) startActivity(newActivityIntent) }) |
...
Code Block | ||
---|---|---|
| ||
#MainActivity.kt private fun createInterstitial() { val interstitialConfigId = ConfigBuilder.INTERSTITIAL_TEST_R89_CONFIG_ID val lifecycleEvents = object : InterstitialEventListener { /* * We need to call show on the onLoaded event and on the OnFailedToLoad event, * this is to show the ad in both cases so the afterInterstitial event is called */ override fun onLoaded() { RefineryAdFactoryR89AdFactory.show(interstitialId) } override fun onFailedToLoad(error: R89LoadError) { RefineryAdFactoryR89AdFactory.show(interstitialId) } .... } interstitialId = RefineryAdFactoryR89AdFactory.createInterstitial( interstitialConfigId , this, afterInterstitial = { Log.d("Interstitial", "After Interstitial") }, lifecycleCallbacks = lifecycleEvents ) } |
Info |
---|
Your They can be many or none depending on your requests, if you need one or more please request them to your account manager or technical account manager. |
...