public interface

MaxAdListener

com.applovin.mediation.MaxAdListener
Known Indirect Subclasses

Class Overview

This interface defines a listener intended to be notified about ad events.

Summary

Public Methods
abstract void onAdClicked(MaxAd ad)
This method is invoked when the ad is clicked.
abstract void onAdDisplayFailed(MaxAd ad, int errorCode)
This method is invoked when the ad failed to displayed.
abstract void onAdDisplayed(MaxAd ad)
This method is invoked when an ad is displayed.
abstract void onAdHidden(MaxAd ad)
This method is invoked when an ad is hidden.
abstract void onAdLoadFailed(String adUnitId, int errorCode)
This method is called when an ad could not be retrieved.
abstract void onAdLoaded(MaxAd ad)
This method is called when a new ad has been loaded.

Public Methods

public abstract void onAdClicked (MaxAd ad)

This method is invoked when the ad is clicked.

This method is invoked on the main UI thread.

Parameters
ad Ad that was just clicked. Guaranteed not to be null.

public abstract void onAdDisplayFailed (MaxAd ad, int errorCode)

This method is invoked when the ad failed to displayed.

This method is invoked on the main UI thread.

Parameters
ad Ad that was just failed to display. Guaranteed not to be null.
errorCode Error that indicates display failure. Common error codes are defined in MaxErrorCodes.

public abstract void onAdDisplayed (MaxAd ad)

This method is invoked when an ad is displayed.

This method is invoked on the main UI thread.

Parameters
ad Ad that was just displayed. Guaranteed not to be null.

public abstract void onAdHidden (MaxAd ad)

This method is invoked when an ad is hidden.

This method is invoked on the main UI thread.

Parameters
ad Ad that was just hidden. Guaranteed not to be null.

public abstract void onAdLoadFailed (String adUnitId, int errorCode)

This method is called when an ad could not be retrieved.

Common error codes are:
204 -- no ad is available
5xx -- internal server error
negative number -- internal errors

Parameters
adUnitId Ad unit identifier for which the ad was requested. Guaranteed not to be null.
errorCode An error code representing the failure reason. Common error codes are defined in MaxErrorCodes.

public abstract void onAdLoaded (MaxAd ad)

This method is called when a new ad has been loaded.

Parameters
ad Newly received ad. Guaranteed not to be null.