PreloadCallback

public interface PreloadCallback


Callback for receiving preloading lifecycle events.

Summary

Public methods

abstract void
onAdFailedToPreload(
    @NonNull String preloadId,
    @NonNull LoadAdError adError
)

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

abstract void
onAdPreloaded(
    @NonNull String preloadId,
    @NonNull ResponseInfo responseInfo
)

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

abstract void

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

Public methods

onAdFailedToPreload

abstract void onAdFailedToPreload(
    @NonNull String preloadId,
    @NonNull LoadAdError adError
)

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

onAdPreloaded

abstract void onAdPreloaded(
    @NonNull String preloadId,
    @NonNull ResponseInfo responseInfo
)

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

Parameters
@NonNull String preloadId

The preload ID that the ad was preloaded for.

@NonNull ResponseInfo responseInfo

The response info of the ad that was preloaded.

onAdsExhausted

abstract void onAdsExhausted(@NonNull String preloadId)

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