AdConfig

data class AdConfig(val appIds: AdAppIds, val globalRequestConfiguration: GlobalRequestConfiguration = GlobalRequestConfiguration(), val debugOptions: AdDebugOptions = AdDebugOptions(), val consentTagForUnderAgeOfConsent: Boolean = false, val initializationHooks: List<AdInitializationHook> = emptyList())(source)

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.

Constructors

Link copied to clipboard
constructor(appIds: AdAppIds, globalRequestConfiguration: GlobalRequestConfiguration = GlobalRequestConfiguration(), debugOptions: AdDebugOptions = AdDebugOptions(), consentTagForUnderAgeOfConsent: Boolean = false, initializationHooks: List<AdInitializationHook> = emptyList())
constructor(androidAppId: String, iosAppId: String, testMode: Boolean = false, testDeviceIds: List<String> = emptyList(), debugGeography: ConsentDebugGeography = ConsentDebugGeography.Disabled, ageRestrictedTreatment: AgeRestrictedTreatment = AgeRestrictedTreatment.Unspecified, consentTagForUnderAgeOfConsent: Boolean = false, initializationHooks: List<AdInitializationHook> = emptyList())

Convenience secondary constructor that accepts platform app IDs directly and derives AdAppIds, GlobalRequestConfiguration, and AdDebugOptions.

Properties

Link copied to clipboard

Convenience accessor for AdAppIds.android.

Link copied to clipboard

Per-platform AdMob app IDs.

Link copied to clipboard

UMP-only tag indicating whether the user is under the age of consent.

Link copied to clipboard
Link copied to clipboard

Debug and test-mode options.

Link copied to clipboard

Global request configuration applied to all ad requests.

Link copied to clipboard

Hooks invoked during initialization phases.

Link copied to clipboard

Convenience accessor for AdAppIds.ios.

Link copied to clipboard
Link copied to clipboard

Convenience accessor for AdDebugOptions.testMode.