|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MediationBannerListener
Callback for an adapter to communicate back to the mediation library. Events must be communicated back for the mediation library to properly manage ad flow.
The onClick(MediationBannerAdapter)
method in particular is required for metrics to
operate correctly.
Method Summary | |
---|---|
void |
onClick(MediationBannerAdapter<?,?> adapter)
Indicates that the user has clicked on this ad. |
void |
onDismissScreen(MediationBannerAdapter<?,?> adapter)
Indicates that the ad control rendered something in full screen and is now transferring control back to the application. |
void |
onFailedToReceiveAd(MediationBannerAdapter<?,?> adapter,
AdRequest.ErrorCode error)
Indicates that an ad request has failed along with the underlying cause. |
void |
onLeaveApplication(MediationBannerAdapter<?,?> adapter)
Indicates that the ad is causing the device to switch to a different application (such as a web browser). |
void |
onPresentScreen(MediationBannerAdapter<?,?> adapter)
Indicates that the ad control is rendering something that is full screen. |
void |
onReceivedAd(MediationBannerAdapter<?,?> adapter)
Indicates that an ad has been requested and successfully received. |
Method Detail |
---|
void onReceivedAd(MediationBannerAdapter<?,?> adapter)
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.
From the point when this method is called until the adapter is destroyed,
MediationBannerAdapter.getBannerView()
must return a View
object;
null
is not permitted. The same View
object must be returned on
every request.
adapter
- The mediation adapter which raised the event.onFailedToReceiveAd(MediationBannerAdapter, AdRequest.ErrorCode)
void onFailedToReceiveAd(MediationBannerAdapter<?,?> adapter, AdRequest.ErrorCode error)
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.
adapter
- The mediation adapter which raised the event.error
- An error code detailing the cause of the failure.onReceivedAd(MediationBannerAdapter)
void onPresentScreen(MediationBannerAdapter<?,?> adapter)
Activity
, or it may be a precursor to switching to a different application.
Once this screen is dismissed, onDismissScreen(MediationBannerAdapter)
must be
called.
adapter
- The mediation adapter which raised the event.void onDismissScreen(MediationBannerAdapter<?,?> adapter)
adapter
- The mediation adapter which raised the event.onPresentScreen(MediationBannerAdapter)
void onLeaveApplication(MediationBannerAdapter<?,?> adapter)
adapter
- The mediation adapter which raised the event.void onClick(MediationBannerAdapter<?,?> adapter)
onLeaveApplication(MediationBannerAdapter)
would generally
mean that the user has clicked on an ad, but onClick(MediationBannerAdapter)
must be
called regardless.
adapter
- The mediation adapter which raised the event.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |