SwipeableInterstitialAd

@ExperimentalApi
interface SwipeableInterstitialAd : Ad


A swipeable interstitial ad.

Summary

Public companion functions

suspend AdLoadResult<SwipeableInterstitialAd>

Loads a swipeable interstitial ad, suspending until it successfully loads or fails to load.

Unit
load(
    adRequest: SwipeableInterstitialAdRequest,
    adLoadCallback: AdLoadCallback<SwipeableInterstitialAd>
)

Loads a swipeable interstitial ad, providing the result via adLoadCallback.

Public functions

AdSize

Returns the AdSize of this SwipeableInterstitialAd.

Int

Returns the required screen hold duration for the ad in seconds.

View
getView(activity: Activity)

Returns the swipeable interstitial View rendered by the Google Mobile Ads SDK.

Public properties

SwipeableInterstitialAdEventCallback?

Optional callback for ad events during the lifecycle of this SwipeableInterstitialAd.

VideoController.VideoLifecycleCallbacks?

Optional callback for receiving video lifecycle events.

Inherited functions

From com.google.android.libraries.ads.mobile.sdk.common.Ad
Unit

Destroys the ad, stopping any extra processing and destroying resources associated with the ad.

ResponseInfo

Gets information about the ad response for this ad.

Inherited properties

From com.google.android.libraries.ads.mobile.sdk.common.Ad
Long

An identifier for a placement in reporting.

Public companion functions

load

suspend fun load(adRequest: SwipeableInterstitialAdRequest): AdLoadResult<SwipeableInterstitialAd>

Loads a swipeable interstitial ad, suspending until it successfully loads or fails to load.

load

fun load(
    adRequest: SwipeableInterstitialAdRequest,
    adLoadCallback: AdLoadCallback<SwipeableInterstitialAd>
): Unit

Loads a swipeable interstitial ad, providing the result via adLoadCallback.

Public functions

getAdSize

fun getAdSize(): AdSize

Returns the AdSize of this SwipeableInterstitialAd.

getScreenHoldDuration

fun getScreenHoldDuration(): Int

Returns the required screen hold duration for the ad in seconds.

getView

fun getView(activity: Activity): View

Returns the swipeable interstitial View rendered by the Google Mobile Ads SDK.

Parameters
activity: Activity

The Activity that will host the View.

Public properties

adEventCallback

var adEventCallbackSwipeableInterstitialAdEventCallback?

Optional callback for ad events during the lifecycle of this SwipeableInterstitialAd.

videoLifecycleCallbacks

var videoLifecycleCallbacksVideoController.VideoLifecycleCallbacks?

Optional callback for receiving video lifecycle events.