Android SDK Version
  • java.lang.Object
    • com.facebook.ads.AbstractAdListener

public class AbstractAdListener
extends java.lang.Object
implements InterstitialAdExtendedListener, RewardedVideoAdExtendedListener, RewardedInterstitialAdExtendedListener
AbstractAdListener implements AdListener, InterstitialAdExtendedListener, RewardedVideoAdExtendedListener and RewardedInterstitialAdExtendedListener. The default implementation is to do nothing.
Instead of implementing all methods in those interfaces, client only overrides the methods handling desired events.
Since:
4.6
Constructor Summary
Constructor and Description
AbstractAdListener() 
Method Summary
Modifier and TypeMethod and Description
voidonAdClicked(Ad ad)
Called when the ad control is clicked and user is redirected to the link in the ad.
voidonAdLoaded(Ad ad)
Called when the ad control has loaded an ad.
voidonError(Ad ad, AdError error)
Called when an error happened while the ad control is attempting to load an ad.
voidonInterstitialActivityDestroyed()
Called when the Interstitial activity is destroyed.
voidonInterstitialDismissed(Ad ad)
Called when the interstitial ad control is dismissed.
voidonInterstitialDisplayed(Ad ad)
Called when the interstitial ad control is displayed.
voidonLoggingImpression(Ad ad)
Called immediately before an impression is logged.
voidonRewardedAdCompleted()
Called when the reward criteria for any ad is satisfied on client.
voidonRewardedAdServerFailed()
Called when the reward criteria for any ad fails from server url, if used.
voidonRewardedAdServerSucceeded()
Called when the reward criteria for any ad is satisfied from server url, if used.
voidonRewardedInterstitialActivityDestroyed()
Called when the Rewarded Interstitial activity is destroyed.
voidonRewardedInterstitialClosed()
Called immediately after the user clicks the close button.
voidonRewardedInterstitialCompleted()
Called immediately after the rewarded interstitial was completed.
voidonRewardedVideoActivityDestroyed()
Called when the Rewarded Video activity is destroyed.
voidonRewardedVideoClosed()
Called immediately after the user click the close button.
voidonRewardedVideoCompleted()
Called immediately after the rewarded video was completed.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

AbstractAdListener

public AbstractAdListener()
Method Detail

onError

public void onError(Ad ad,
                    AdError error)
Called when an error happened while the ad control is attempting to load an ad.
Specified by:
onError in interface AdListener
Parameters:
ad - the ad control
error - the error
Since:
4.6

onAdLoaded

public void onAdLoaded(Ad ad)
Called when the ad control has loaded an ad.
Specified by:
onAdLoaded in interface AdListener
Parameters:
ad - the ad control
Since:
4.6

onAdClicked

public void onAdClicked(Ad ad)
Called when the ad control is clicked and user is redirected to the link in the ad.
Specified by:
onAdClicked in interface AdListener
Parameters:
ad - the ad control
Since:
4.6

onInterstitialDisplayed

public void onInterstitialDisplayed(Ad ad)
Called when the interstitial ad control is displayed.
Specified by:
Parameters:
ad - the ad control
Since:
4.6

onInterstitialDismissed

public void onInterstitialDismissed(Ad ad)
Called when the interstitial ad control is dismissed.
Specified by:
Parameters:
ad - the ad control
Since:
4.6

onRewardedVideoCompleted

public void onRewardedVideoCompleted()
Description copied from interface: RewardedVideoAdListener
Called immediately after the rewarded video was completed.
Specified by:
Since:
6.3

onRewardedInterstitialCompleted

public void onRewardedInterstitialCompleted()
Description copied from interface: RewardedInterstitialAdListener
Called immediately after the rewarded interstitial was completed.

onRewardedInterstitialClosed

public void onRewardedInterstitialClosed()
Description copied from interface: RewardedInterstitialAdListener
Called immediately after the user clicks the close button.

onRewardedInterstitialActivityDestroyed

public void onRewardedInterstitialActivityDestroyed()
Description copied from interface: RewardedInterstitialAdExtendedListener
Called when the Rewarded Interstitial activity is destroyed. This callback will only be called if the activity has been destroyed without being properly closed. This can happen if an app with launchMode:singleTask (such as a Unity game) goes to background and then relaunched by tapping the icon.

onLoggingImpression

public void onLoggingImpression(Ad ad)
Called immediately before an impression is logged.
Specified by:
Parameters:
ad - the ad control
Since:
4.6

onRewardedVideoClosed

public void onRewardedVideoClosed()
Description copied from interface: RewardedVideoAdListener
Called immediately after the user click the close button.
Specified by:
Since:
6.3

onInterstitialActivityDestroyed

public void onInterstitialActivityDestroyed()
Description copied from interface: InterstitialAdExtendedListener
Called when the Interstitial activity is destroyed. This callback will only be called if the activity has been destroyed without being properly closed. This can happen if an app with launchMode:singleTask (such as a Unity game) goes to background and then relaunched by tapping the icon.

onRewardedAdCompleted

public void onRewardedAdCompleted()
Description copied from interface: RewardedAdListener
Called when the reward criteria for any ad is satisfied on client.
Specified by:
Since:
6.3

onRewardedAdServerSucceeded

public void onRewardedAdServerSucceeded()
Description copied from interface: RewardedAdListener
Called when the reward criteria for any ad is satisfied from server url, if used.
Specified by:
Since:
6.3

onRewardedAdServerFailed

public void onRewardedAdServerFailed()
Description copied from interface: RewardedAdListener
Called when the reward criteria for any ad fails from server url, if used.
Specified by:
Since:
6.3

onRewardedVideoActivityDestroyed

public void onRewardedVideoActivityDestroyed()
Description copied from interface: RewardedVideoAdExtendedListener
Called when the Rewarded Video activity is destroyed. This callback will only be called if the activity has been destroyed without being properly closed. This can happen if an app with launchMode:singleTask (such as a Unity game) goes to background and then relaunched by tapping the icon.