Package-level declarations

Types

Link copied to clipboard
class AdException(message: String? = null) : Exception

Represents an exception that occurred during an ad operation.

Link copied to clipboard
actual class AdSize(val width: Int, val height: Int)

Represents the size of an ad.

expect class AdSize(width: Int, height: Int)

Represents the size of an ad in density-independent pixels (dp). This is a multiplatform representation of the AdMob AdSize.

actual class AdSize(val width: Int, val height: Int)

The iOS implementation of AdSize.

Link copied to clipboard

Represents the different states of an ad during its lifecycle.

Link copied to clipboard
actual object AdUnitId

A utility object for providing ad unit IDs.

expect object AdUnitId

A utility object for providing ad unit IDs.

actual object AdUnitId
Link copied to clipboard
actual class BannerAdHandler(activity: Any?)

A handler for banner ads on Android.

expect class BannerAdHandler(activity: Any?)

A handler for creating and managing banner ads that cover part of the host app screen.

actual class BannerAdHandler(activity: Any?)
Link copied to clipboard
class BannerAdListener(val onLoad: () -> Unit, val onFailure: (Exception) -> Unit, val onDismissed: () -> Unit, val onShown: () -> Unit, val onImpression: () -> Unit, val onClick: () -> Unit) : AdListener

An AdListener for banner ads.

Link copied to clipboard
typealias BannerView = AdView

A typealias for AdView on Android.

typealias BannerView = GADBannerView
Link copied to clipboard
class BannerViewDelegate(onLoad: () -> Unit, onWillDismiss: () -> Unit, onDismissed: () -> Unit, onShown: () -> Unit, onImpression: () -> Unit, onClick: () -> Unit, onFailure: (Exception) -> Unit) : NSObject, GADBannerViewDelegateProtocol
Link copied to clipboard
actual object BasicAds

A utility object for initializing the Mobile Ads SDK.

expect object BasicAds

A utility object for initializing and configuring the Mobile Ads SDK.

actual object BasicAds
Link copied to clipboard
actual class Consent(activity: Any?)
expect class Consent(activity: Any?)

Manages consent and privacy forms using the Google User Messaging Platform (UMP) SDK.

actual class Consent(activity: Any?)
Link copied to clipboard

Debug settings to hardcode in test requests to Consent.requestConsentInfoUpdate.

Link copied to clipboard
class ConsentException(message: String?) : Exception

Indicates an issue with the User Messaging Platform (UMP) module, which is responsible for obtaining, loading, or showing consent information from the user.

Link copied to clipboard

Parameters sent when updating user consent information.

Link copied to clipboard

For Android, complete the steps in AdMob's instructions:

Link copied to clipboard

Annotation for APIs that depend on the Google User Messaging Platform (UMP) library.

Link copied to clipboard

Annotation for Basic-Ads APIs that are experimental and may be deprecated between releases.

Link copied to clipboard
class FullScreenContentDelegate(onDismissed: () -> Unit, onShown: () -> Unit, onImpression: () -> Unit, onClick: () -> Unit, onFailure: (Exception) -> Unit) : NSObject, GADFullScreenContentDelegateProtocol
Link copied to clipboard
class FullscreenContentDelegate(onDismissed: () -> Unit, onShown: () -> Unit, onImpression: () -> Unit, onClick: () -> Unit, onFailure: (Exception) -> Unit) : FullScreenContentCallback

A FullScreenContentCallback for handling full-screen ad content events.

Link copied to clipboard
actual class InterstitialAdHandler(activity: Any?)

A handler for interstitial ads on Android.

expect class InterstitialAdHandler(activity: Any?)

An InterstitialAdHandler is a full-screen ad that cover the interface of the host app. They're typically displayed at natural transition points in the flow of an app, such as between activities or during the pause between levels in a game. When an app shows an interstitial ad, the user has the choice to either tap on the ad and continue to its destination or close it and return to the app.

actual class InterstitialAdHandler(activity: Any?)
Link copied to clipboard
data class RequestConfiguration(val maxAdContentRating: String?, val publisherPrivacyPersonalizationState: RequestConfiguration.PublisherPrivacyPersonalizationState, val tagForChildDirectedTreatment: Int, val tagForUnderAgeOfConsent: Int, val testDeviceIds: List<String?>?)

Sets the initial configuration of your AdMob instance for Android and iOS

Link copied to clipboard
actual class RewardedAdHandler(activity: Any?)

A handler for rewarded ads on Android.

expect class RewardedAdHandler(activity: Any?)

An RewardedAdHandler is a full-screen ad that cover the interface of the host app. They're typically displayed at natural transition points in the flow of an app, such as between activities or during the pause between levels in a game. When an app shows an rewarded ad, the user has the choice to either tap on the ad and continue to its destination or close it and return to the app.

actual class RewardedAdHandler(activity: Any?)
Link copied to clipboard
actual class RewardedInterstitialAdHandler(activity: Any?)

A handler for rewarded interstitial ads on Android.

expect class RewardedInterstitialAdHandler(activity: Any?)

An RewardedInterstitialAdHandler is a full-screen ad that cover the interface of the host app. They're typically displayed at natural transition points in the flow of an app, such as between activities or during the pause between levels in a game. When an app shows an RewardedInterstitial ad, the user has the choice to either tap on the ad and continue to its destination or close it and return to the app.

actual class RewardedInterstitialAdHandler(activity: Any?)
Link copied to clipboard
actual class RewardItem

A reward item earned by the user.

expect class RewardItem
actual class RewardItem

Functions

Link copied to clipboard
fun CValue<CGRect>.height(): Int

Returns the height of the CGRect.

Link copied to clipboard
fun CValue<GADAdSize>.toAdSize(): AdSize

Converts a CValue of GADAdSize to a common AdSize.

fun CValue<CGRect>.toAdSize(): AdSize

Converts a CValue of CGRect to a common AdSize.

Link copied to clipboard
fun AdSize.toAndroid(): AdSize

Converts a common AdSize to a com.google.android.gms.ads.AdSize.

fun RequestConfiguration.toAndroid(): RequestConfiguration

Converts a common RequestConfiguration to a com.google.android.gms.ads.RequestConfiguration.

fun RequestConfiguration.PublisherPrivacyPersonalizationState.toAndroid(): RequestConfiguration.PublisherPrivacyPersonalizationState

Converts a common RequestConfiguration.PublisherPrivacyPersonalizationState to a com.google.android.gms.ads.RequestConfiguration.PublisherPrivacyPersonalizationState.

Link copied to clipboard

Converts a common AdSize to a CValue of CGRect.

fun GADAdSize.toCGRectCValue(): CValue<CGRect>

Converts an iOS-specific GADAdSize to a CValue of CGRect.

Link copied to clipboard
fun AdSize.toCommon(): AdSize

Converts a com.google.android.gms.ads.AdSize to a common AdSize.

fun RequestConfiguration.toCommon(): RequestConfiguration

Converts a com.google.android.gms.ads.RequestConfiguration to a common RequestConfiguration.

fun RequestConfiguration.PublisherPrivacyPersonalizationState.toCommon(): RequestConfiguration.PublisherPrivacyPersonalizationState

Converts a com.google.android.gms.ads.RequestConfiguration.PublisherPrivacyPersonalizationState to a common RequestConfiguration.PublisherPrivacyPersonalizationState.

fun GADAdSize.toCommon(): AdSize

Converts an iOS-specific GADAdSize to a common AdSize.

Link copied to clipboard
fun CValue<CGRect>.width(): Int

Returns the width of the CGRect.