RewardedAdController

Full-screen ad controller for rewarded video format.

Properties

Link copied to clipboard
abstract val events: SharedFlow<AdEvent>

Shared flow of full-screen ad lifecycle events.

Link copied to clipboard
abstract val loadState: StateFlow<AdLoadState>

Current load state.

Link copied to clipboard
abstract val placement: AdPlacement

The placement this controller is bound to.

Functions

Link copied to clipboard

Returns current availability info (cached count, expiry).

Link copied to clipboard
abstract fun clear()

Clears cached ads and releases resources.

Link copied to clipboard
open fun isReady(): Boolean

True when at least one cached ad is ready to show.

Link copied to clipboard
abstract suspend fun load(requestOptions: AdRequestOptions = placement.requestOptions): AdLoadState

Loads an ad. Suspends until the load completes.

Link copied to clipboard
open suspend fun preload(requestOptions: AdRequestOptions = placement.requestOptions): AdLoadState

Alias for load.

Link copied to clipboard
abstract suspend fun show(options: FullScreenAdOptions = placement.fullScreenOptions): AdShowResult

Shows the ad. Suspends until the ad is dismissed and returns AdShowResult.

abstract suspend fun show(options: FullScreenAdOptions = placement.fullScreenOptions, onRewardEarned: (AdReward) -> Unit): AdShowResult