AdUnitId

actual object AdUnitId
expect object AdUnitId

An object used to hold functions related to AdMob AdUnitIds.

This object provides a way to manage and access AdMob AdUnitIds for different ad types and platforms. It includes a utility function for selecting the appropriate AdUnitId based on the current platform (Android or iOS) and provides default AdUnitIds for common ad formats.

See also

For selecting AdUnitIds dynamically based on the platform.

Default AdUnitId for Banner ads.

Default AdUnitId for Interstitial ads.

Default AdUnitId for Rewarded Interstitial ads.

Default AdUnitId for Rewarded ads.

actual object AdUnitId

Properties

Link copied to clipboard
actual const val BANNER_DEFAULT: String
actual const val BANNER_DEFAULT: String
Link copied to clipboard
actual const val INTERSTITIAL_DEFAULT: String
actual const val INTERSTITIAL_DEFAULT: String
Link copied to clipboard
actual const val REWARDED_DEFAULT: String
actual const val REWARDED_DEFAULT: String
Link copied to clipboard

Functions

Link copied to clipboard
actual fun autoSelect(androidAdUnitId: String?, iosAdUnitId: String?): String
expect fun autoSelect(androidAdUnitId: String? = null, iosAdUnitId: String? = null): String

Provides a way of selecting an AdMob AdUnitId by platform during runtime. This function works for any ad type.

actual fun autoSelect(androidAdUnitId: String?, iosAdUnitId: String?): String