AdManager
Entry point to the ads SDK. Provides controllers for every ad format, consent lifecycle management, diagnostics, and a flow of AdEvents. Obtain the process-wide singleton via rememberAdManager (Compose) or AdMob.manager(context) (Android, outside Compose).
Factory functions (banner, interstitial, rewarded, etc.) return cached controllers per placement id. Reusing the same id with a different AdPlacement configuration throws an IllegalStateException.
Controllers are cached for the lifetime of the manager and are not evicted automatically. Use a small, finite set of static placement ids — do not generate per-item ids (e.g. "feed_item_$index"), which would accumulate controllers without bound. For repeating UI (feeds, lists), reuse one placement id across items; the native pool handles per-item ads.
Inheritors
Properties
Consent lifecycle controller (UMP integration).
Diagnostics and debug tools.
Current initialization and consent state of the SDK.
App Tracking Transparency controller (iOS); a no-op reporting NotApplicable on Android.
Functions
Returns an AppOpenAdController for placement, cached by id.
Returns a BannerAdController for placement, cached by id.
Convenience extension that calls initialize with ConsentMode.GatherBeforeInitialize — the standard consent flow that requests a UMP update, shows the form if required, and initializes ads when permitted.
Initializes the Google Mobile Ads SDK with the given config and consentMode.
Returns an InterstitialAdController for placement, cached by id.
Returns a NativeAdPool for placement, cached by id.
Returns a RewardedAdController for placement, cached by id.
Returns a RewardedInterstitialAdController for placement, cached by id.
Convenience extension that calls ConsentController.showPrivacyOptions on this manager's AdManager.consent controller.