AdPlacement
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.
Parameters
Unique identifier for this placement. Used for controller caching and event attribution.
The ad format this placement targets.
Per-platform ad-unit IDs.
Per-request targeting and extras.
Cache sizing, TTL, and reload behavior.
Retry strategy for failed loads.
Bounds on how long a load or presentation hand-off may take before it is treated as failed.
Banner size (only relevant for AdFormat.Banner).
Banner auto-refresh policy (only relevant for AdFormat.Banner).
Native ad rendering options (only relevant for AdFormat.Native).
Full-screen ad display options (only relevant for full-screen formats).
When false, the placement is skipped by composables and lookups via List
When true, the placement throws at construction if any ad unit id is not a Google test ad unit. Opt-in and default false; intended for debug builds only. Does not affect production builds.
Throws
if id is blank, cachePolicy.maxSize< 1, or strictTestMode is enabled and any ad unit id is not a test unit.
Constructors
Convenience constructor that accepts platform ad-unit IDs directly instead of an AdUnitIds wrapper.
Properties
Convenience accessor for the Android ad-unit ID.
Convenience accessor for the iOS ad-unit ID.
Convenience accessor for AdCachePolicy.maxSize.