PreloadCallback

interface PreloadCallback


Callback for receiving preloading lifecycle events.

Summary

Public functions

Unit
onAdFailedToPreload(preloadId: String, adError: LoadAdError)

Called when an ad failed to load for a given preload ID.

Unit
onAdPreloaded(preloadId: String, responseInfo: ResponseInfo)

Called when a new ad is available for the given preload ID.

Unit
onAdsExhausted(preloadId: String)

Called when the last available ad is exhausted for the given preload ID.

Public functions

onAdFailedToPreload

fun onAdFailedToPreload(preloadId: String, adError: LoadAdError): Unit

Called when an ad failed to load for a given preload ID.

onAdPreloaded

fun onAdPreloaded(preloadId: String, responseInfo: ResponseInfo): Unit

Called when a new ad is available for the given preload ID.

Parameters
preloadId: String

The preload ID that the ad was preloaded for.

responseInfo: ResponseInfo

The response info of the ad that was preloaded.

onAdsExhausted

fun onAdsExhausted(preloadId: String): Unit

Called when the last available ad is exhausted for the given preload ID.