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)
expect class AdSize(width: Int, height: Int)

Based on the AdMob implementation of AdSize, this module enables Android-like syntax to be used multiplatform.

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

The different states of an Ad

Link copied to clipboard
actual object AdUnitId
expect object AdUnitId

An object used to hold functions related to AdMob AdUnitIds.

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

A BannerAdHandler creates landscape 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
Link copied to clipboard
typealias BannerView = AdView
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
expect object BasicAds

The main module for instantiating Android and iOS implementations of AdMob

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

Create consent and privacy forms via the Google User Messaging Platform. Types are found under the Privacy & messaging tab of your AdMob account.

expect class Consent(activity: Any?)

Create consent and privacy forms via the Google User Messaging Platform. Types are found under the Privacy & messaging tab of your AdMob account.

actual class Consent(activity: Any?)

Create consent and privacy forms via the Google User Messaging Platform. Types are found under the Privacy & messaging tab of your AdMob account.

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

Marks declarations that are still experimental in the Basic Ads API.

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
Link copied to clipboard
actual class InterstitialAdHandler(activity: Any?)
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?)
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?)
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?)

Functions

Link copied to clipboard
fun CValue<CGRect>.height(): Int
Link copied to clipboard
fun CValue<GADAdSize>.toAdSize(): AdSize
fun CValue<CGRect>.toAdSize(): AdSize
Link copied to clipboard
fun AdSize.toAndroid(): AdSize
fun RequestConfiguration.toAndroid(): RequestConfiguration
fun RequestConfiguration.PublisherPrivacyPersonalizationState.toAndroid(): RequestConfiguration.PublisherPrivacyPersonalizationState
Link copied to clipboard
fun GADAdSize.toCGRectCValue(): CValue<CGRect>
Link copied to clipboard
fun AdSize.toCommon(): AdSize
fun RequestConfiguration.toCommon(): RequestConfiguration
fun RequestConfiguration.PublisherPrivacyPersonalizationState.toCommon(): RequestConfiguration.PublisherPrivacyPersonalizationState
fun GADAdSize.toCommon(): AdSize
Link copied to clipboard
fun CValue<CGRect>.width(): Int