Package-level declarations
Types
Initialization status of a mediation adapter.
Availability information for cached ads.
Caching policy for ad formats that support multiple cached ads (native, full-screen). Cache is FIFO; ads are evicted when maxSize is exceeded or when TTL (from expirationPolicy) expires.
Top-level SDK configuration for the Google Mobile Ads SDK. Passed to AdManager.initialize. The secondary constructor provides a convenient surface for the most common fields.
Debug and test options for the SDK. testMode does not force GMA to serve test ads by itself — it only enables UMP's debug consent-gathering settings. Google's SDK determines whether a request is a test request from the device's registration in GlobalRequestConfiguration.testDeviceIds (Android/iOS emulators and simulators qualify automatically; physical devices require the device's hashed test-device ID, printed to logcat/console on an unregistered request). If testMode is true and no test device IDs are configured, the SDK logs a warning at initialization rather than silently doing nothing — see dev.avinya.ads.TestAdIds for a ready-made safe configuration.
Diagnostics and debug tools for the Google Mobile Ads SDK.
Represents an error from the ad SDK. code carries the SDK's own error code string (e.g. AdErrorCode.CONSENT_REQUIRED) or a numeric GMA error code as a string. message is a human-readable description. domain identifies the source subsystem.
SDK-defined error code constants used by AdError. GMA numeric error codes appear as strings in AdError.code but are not listed here.
Lifecycle events emitted by ad controllers and pools. Subscribe via AdManager.events or individual controller/pool events flows.
Time-to-live policy for cached ads. Defaults: full-screen 1 hour, app-open 4 hours, native 1 hour.
Hook invoked at each phase of the SDK initialization lifecycle. Implementations can perform side effects (e.g., server-side config fetch, GDPR consent platform integration) at specific AdInitializationPhases.
Phases of the SDK initialization sequence during which AdInitializationHook.onPhase is called.
Represents the current load state of an ad or ad pool.
Represents the current state of the AdManager. Emitted via AdManager.status as a StateFlow.
Response info for a single ad network in the mediation chain.
Defines a single ad placement — the complete configuration needed to request and render ads of a given format. Every controller factory on AdManager takes an AdPlacement and caches the resulting controller by id.
Supported mobile ad platforms. Used to resolve platform-specific IDs and behavior.
Per-request targeting and configuration options for ad loads. Android-only fields are silently ignored on iOS.
Information about an ad response, including mediation chain details.
Capped exponential-backoff retry policy for ad load failures. Only retryable failures (network, timeout, internal) are retried; non-retryable failures (no fill, consent) are not.
Result of a full-screen ad show operation.
Defines the size of a banner ad. Choice depends on the desired ad format and container constraints.
Bounds on how long a suspending ad operation may take.
App Tracking Transparency authorisation state (iOS 14.5+).
Reads and requests App Tracking Transparency authorisation.
Per-platform AdMob ad-unit IDs (not app IDs). Provide an ID for each platform the app targets; the correct ID is resolved at runtime via forPlatform.
Monetary value of an ad event, specified in micro-units of a currency.
Precision of an AdValue report.
Age treatment applied to Google Mobile Ads requests.
Full-screen ad controller for app-open format. Shows an ad when the app returns to the foreground. For automated lifecycle management use AppOpenAdCoordinator.
Controls a single banner ad placement. Handles loading, refresh, and lifecycle. For Compose UI, prefer BannerAdView which manages the controller automatically.
Layout geometry supplied by the host for a banner request.
Controls how banner ads are refreshed. Choose based on whether you want server-driven, client-timer, or manual refresh.
Controls the consent lifecycle via Google's User Messaging Platform (UMP). Call requestConsentInfoUpdate on every app launch and gatherConsent to show the consent form when required. Gate ad requests on canRequestAds.
Strategy for handling user consent via Google's UMP before SDK initialization. Choose based on your app's consent requirements and target regions.
Consent status reported by Google's UMP. Mirrors the UMP consent status and is distinct from ConsentController.canRequestAds — canRequestAds may be true even when consent was not explicitly obtained (e.g., in non-EEA regions).
Controls a full-screen ad format (interstitial, rewarded, rewarded interstitial, or app-open). Full-screen ads are single-use: show consumes the ad. Successfully presented rewarded ads deliberately remain callback-owned after dismissal so a mediated reward callback may arrive later. Cache and TTL are managed by AdCachePolicy.
Display options for full-screen ads (interstitial, rewarded, app-open).
Typealias for FullScreenAdController. Use this type when you need a slot that can hold any full-screen format (interstitial, rewarded, etc.).
Global request configuration applied to every ad request made through the SDK. Fields mirror the GMA SDK request configuration.
Full-screen ad controller for interstitial format.
Maximum ad content rating filter. Corresponds to GMA MaxAdContentRating.
Default no-op manager used when ads aren't configured. All loads fail with AdError.sdkNotReady and the status is always AdManagerStatus.Disabled.
Impression-level paid event with revenue data. Emitted via AdEvent.Paid.
Whether the user must be given the option to review their privacy settings. Gating: show a privacy-settings entry point only when this is Required; then call ConsentController.showPrivacyOptions.
Publisher privacy personalization state. Controls whether ad personalization is enabled, disabled, or follows the default (user consent) setting.
Full-screen ad controller for rewarded video format.
Full-screen ad controller for rewarded interstitial format.
Server-side verification options for rewarded and rewarded-interstitial ads. Provides userId and customData to the reward server callback for reward validation.
Properties
Ready-made debug AdPlacements covering every AdFormat using TestAdIds. Suitable for samples, QA, and testing.
Functions
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.
Convenience extension that calls ConsentController.showPrivacyOptions on this manager's AdManager.consent controller.