public interface MaxAdListener
| Modifier and Type | Method and Description |
|---|---|
void |
onAdClicked(MaxAd ad)
This method is invoked when the ad is clicked.
|
void |
onAdDisplayed(MaxAd ad)
This method is invoked when an ad is displayed.
|
void |
onAdDisplayFailed(MaxAd ad,
int errorCode)
This method is invoked when the ad failed to displayed.
|
void |
onAdHidden(MaxAd ad)
This method is invoked when an ad is hidden.
|
void |
onAdLoaded(MaxAd ad)
This method is called when a new ad has been loaded.
|
void |
onAdLoadFailed(java.lang.String adUnitId,
int errorCode)
This method is called when an ad could not be retrieved.
|
void onAdLoaded(MaxAd ad)
ad - Newly received ad. Guaranteed not to be null.void onAdLoadFailed(java.lang.String adUnitId,
int errorCode)
Common error codes are: 204 -- no ad is available 5xx -- internal server error negative number -- internal errors
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.void onAdDisplayed(MaxAd ad)
This method is invoked on the main UI thread.
ad - Ad that was just displayed. Guaranteed not to be null.void onAdHidden(MaxAd ad)
This method is invoked on the main UI thread.
ad - Ad that was just hidden. Guaranteed not to be null.void onAdClicked(MaxAd ad)
This method is invoked on the main UI thread.
ad - Ad that was just clicked. Guaranteed not to be null.void onAdDisplayFailed(MaxAd ad, int errorCode)
This method is invoked on the main UI thread.
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.