AdListener

public abstract class AdListener extends Object

A listener for receiving notifications during the lifecycle of an ad.

Public Constructor Summary

Public Method Summary

void
onAdClicked()
Called when a click is recorded for an ad.
void
onAdClosed()
Called when the user is about to return to the application after clicking on an ad.
void
onAdFailedToLoad(LoadAdError adError)
Called when an ad request failed.
void
onAdImpression()
Called when an impression is recorded for an ad.
void
onAdLoaded()
Called when an ad is received.
void
onAdOpened()
Called when an ad opens an overlay that covers the screen.
void
onAdSwipeGestureClicked()
Called when a swipe gesture on an ad is recorded as a click.

Inherited Method Summary

Public Constructors

public AdListener ()

Public Methods

public void onAdClicked ()

Called when a click is recorded for an ad.

public void onAdClosed ()

Called when the user is about to return to the application after clicking on an ad.

public void onAdFailedToLoad (LoadAdError adError)

Called when an ad request failed.

Parameters
adError error information about the failure. AdError.getCode() is one of the error code constants defined in AdRequest.

public void onAdImpression ()

Called when an impression is recorded for an ad.

public void onAdLoaded ()

Called when an ad is received.

public void onAdOpened ()

Called when an ad opens an overlay that covers the screen.

public void onAdSwipeGestureClicked ()

Called when a swipe gesture on an ad is recorded as a click. Currently available for native ads on allowlisted accounts only. Reach out to your account manager to be allowlisted for this feature.