AdPlacement
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.
Convenience constructor that accepts platform ad-unit IDs directly instead of an AdUnitIds wrapper.
Parameters
Unique identifier for this placement.
The ad format.
Android ad-unit ID.
iOS ad-unit ID.
Maximum number of cached ads (default 1). Must be >= 1.
When false, the placement is skipped.
When true, the placement throws at construction if any ad unit id is not a Google test ad unit.
Throws
if id is blank, maxCacheSize< 1, or strictTestMode is enabled and any ad unit id is not a test unit.