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 | |
void |
onAdFailedToLoad(int errorCode)
This method is deprecated. Use
onAdFailedToLoad(LoadAdError) instead.
|
void |
onAdImpression()
Called when an impression is recorded for an ad.
|
void |
onAdLeftApplication()
This method is deprecated. Use ProcessLifecycleOwner
instead.
|
void |
onAdLoaded()
Called when an ad is received.
|
void |
onAdOpened()
Called when an ad opens an overlay that covers the screen.
|
Inherited Method Summary
Public Constructors
public AdListener ()
Public Methods
public void onAdClicked ()
Called when a click is recorded for an ad. This method is called for Google native ads.
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 onAdFailedToLoad (int errorCode)
This method is deprecated.
Use
onAdFailedToLoad(LoadAdError)
instead.
Called when an ad request failed. The error code is one of the error code constants
defined in AdRequest
.
public void onAdImpression ()
Called when an impression is recorded for an ad. This method is called for Google banner and native ads.
public void onAdLeftApplication ()
This method is deprecated.
Use ProcessLifecycleOwner
instead.
Called when an ad leaves the application (e.g., to go to the browser).
public void onAdLoaded ()
Called when an ad is received.
public void onAdOpened ()
Called when an ad opens an overlay that covers the screen.