AdsSdkState

Whether the Google Mobile Ads SDK has been initialized in this process.

Every ad loader in the SDK throws IllegalStateException("MobileAds.initialize must be called before using the Google Mobile Ads SDK.") when called too early, and there is no public way to ask the SDK itself. Initialization is asynchronous and starts during app startup, so an ad surface composed early would otherwise either crash or silently give up and never retry.

AppOpenAdController is the only writer; ad views observe isReady and start their request when, and only when, it turns true.

Properties

Link copied to clipboard
val isReady: StateFlow<Boolean>

true once MobileAds.initialize has been called for this process.

Functions

Link copied to clipboard

Whether an ad may be requested right now.

Link copied to clipboard

Marks the SDK as initialized. Called by AppOpenAdController and nothing else.