This interface is deprecated.
Use Adapter
and
MediationAdLoadCallback
instead.
A listener containing callbacks for an adapter to communicate back to the mediation library. Events must be communicated back for the mediation library to properly manage ad flow.
Public Method Summary
abstract void | |
abstract void |
onAdClosed(MediationNativeAdapter
adapter)
Indicates that the ad control rendered something in full screen and is now
transferring control back to the application.
|
abstract void |
onAdFailedToLoad(MediationNativeAdapter
adapter, int error)
This method is deprecated. Use
onAdFailedToLoad(MediationNativeAdapter, AdError) instead.
|
abstract void |
onAdFailedToLoad(MediationNativeAdapter
adapter, AdError adError)
Indicates that an ad request failed to load.
|
abstract void |
onAdImpression(MediationNativeAdapter
adapter)
Indicates that an impression has been recorded for the ad.
|
abstract void |
onAdLeftApplication(MediationNativeAdapter
adapter)
Indicates that the ad is causing the device to switch to a different
application (such as a web browser).
|
abstract void |
onAdLoaded(MediationNativeAdapter
adapter,
UnifiedNativeAdMapper unifiedNativeAdMapper)
Indicates that an ad has been requested and successfully received.
|
abstract void |
onAdOpened(MediationNativeAdapter
adapter)
Indicates that the ad control is rendering something that is full screen.
|
abstract void |
onVideoEnd(MediationNativeAdapter
adapter)
Indicates that an ad has completely finished playing video.
|
Public Methods
public abstract void onAdClicked (MediationNativeAdapter adapter)
Indicates that the user has clicked on this ad. This method should only be called if
UnifiedNativeAdMapper.setOverrideClickHandling(boolean)
is set to true. This
is used for publisher metrics, and must be called in addition to any other events.
Parameters
adapter | The mediation adapter which raised the event. |
---|
public abstract void onAdClosed (MediationNativeAdapter adapter)
Indicates that the ad control rendered something in full screen and is now transferring control back to the application. This may be the user returning from a different application.
Parameters
adapter | The mediation adapter which raised the event. |
---|
public abstract void onAdFailedToLoad (MediationNativeAdapter adapter, int error)
This method is deprecated.
Use
onAdFailedToLoad(MediationNativeAdapter, AdError)
instead.
Indicates that an ad request has failed along with the underlying cause. A failure may be an actual error or just a lack of fill.
Once an ad is requested, the adapter must report either success or failure. If no response is heard within a time limit, the mediation library may move on to another adapter, resulting in a potentially successful ad not being shown.
Parameters
adapter | The mediation adapter which raised the event. |
---|---|
error | An error code detailing the cause of the failure. |
public abstract void onAdFailedToLoad (MediationNativeAdapter adapter, AdError adError)
Indicates that an ad request failed to load.
Parameters
adapter | The mediation adapter which raised the event. |
---|---|
adError | AdError detailing the cause of the failure. |
public abstract void onAdImpression (MediationNativeAdapter adapter)
Indicates that an impression has been recorded for the ad. This method should only
be called if
UnifiedNativeAdMapper.setOverrideImpressionRecording(boolean)
is set to
true. This is used for publisher metrics, and must be called in addition to any other
events.
Parameters
adapter | The mediation adapter which raised the event. |
---|
public abstract void onAdLeftApplication (MediationNativeAdapter adapter)
Indicates that the ad is causing the device to switch to a different application (such as a web browser). This must be called before the current application is put in the background.
Parameters
adapter | The mediation adapter which raised the event. |
---|
public abstract void onAdLoaded (MediationNativeAdapter adapter, UnifiedNativeAdMapper unifiedNativeAdMapper)
Indicates that an ad has been requested and successfully received.
Once an ad is requested, the adapter must report either success or failure. If no response is heard within a time limit, the mediation library may move on to another adapter, resulting in a potentially successful ad not being shown.
Parameters
adapter | The mediation adapter which raised the event. |
---|---|
unifiedNativeAdMapper | The mapping class which provides a mapping from mediated ad network's ad object to unified native ad object. |
public abstract void onAdOpened (MediationNativeAdapter adapter)
Indicates that the ad control is rendering something that is full screen. This may
be an Activity
, or
it may be a precursor to switching to a different application.
Once this screen is dismissed,
onAdClosed(MediationNativeAdapter)
must be called.
Parameters
adapter | The mediation adapter which raised the event. |
---|
public abstract void onVideoEnd (MediationNativeAdapter adapter)
Indicates that an ad has completely finished playing video.
Parameters
adapter | The mediation adapter which raised the event. |
---|