handleEventForNimbus
App Event handler for the Nimbus SDK for com.google.android.gms.ads.admanager.AdManagerAdView and com.google.android.gms.ads.AdView.
This function is designed to work in conjunction with an existing app event listener attached to the AdView and should be added to all AdViews that may render a Nimbus ad.
Example usage:
AdManagerAdView(context).apply {
setAppEventListener { s, s2 ->
if (handleEventForNimbus(name = s, info = s2)) return@setAppEventListener
TODO("Event was not meant for Nimbus")
}
}Return
true if the event was for the Nimbus SDK.
Parameters
the event name
the event payload
App Event handler for the Nimbus SDK for com.google.android.gms.ads.admanager.AdManagerInterstitialAd and com.google.android.gms.ads.interstitial.InterstitialAd.
This function is designed to work in conjunction with an existing app event listener attached to the InterstitialAd and should be added to all Interstitials that may render a Nimbus ad.
Example usage:
AdManagerInterstitialAd.load(context, "placement_id", AdManagerAdRequest.Builder().build(),
object : AdManagerInterstitialAdLoadCallback() {
override fun onAdLoaded(interstitialAd: AdManagerInterstitialAd) {
interstitialAd.setAppEventListener { s, s2 ->
if (handleEventForNimbus(name = s, info = s2)) return@setAppEventListener
TODO("Event was not meant for Nimbus")
}
interstitialAd.show(activity)
}
override fun onAdFailedToLoad(p0: LoadAdError) { TODO("Handle Error") }
}
)Return
true if the event was for the Nimbus SDK.
Parameters
the event name
the event payload