public interface CustomEventBanner extends CustomEvent
When the mediation framework schedules the custom event to be executed, the
requestBannerAd(com.google.ads.mediation.customevent.CustomEventBannerListener, android.app.Activity, java.lang.String, java.lang.String, com.google.ads.AdSize, com.google.ads.mediation.MediationAdRequest, java.lang.Object)
method is called.
Modifier and Type | Method and Description |
---|---|
void |
requestBannerAd(CustomEventBannerListener listener,
Activity activity,
String label,
String serverParameter,
AdSize size,
MediationAdRequest mediationAdRequest,
Object customEventExtra)
This method is called by the mediation framework on the UI thread when the custom event object
is scheduled to be executed.
|
destroy
void requestBannerAd(CustomEventBannerListener listener, Activity activity, String label, String serverParameter, AdSize size, MediationAdRequest mediationAdRequest, Object customEventExtra)
listener
- You can call methods of this object to report the result of the custom event
execution as well as report certain other events to the mediation framework. To report a
successful execution of your custom event call
listener.onReceivedAd(view)
. This signals
the mediation framework to stop mediation and display 'view' in the
AdView
. To report a failed execution of the custom event call
listener.onFailedToReceiveAd
. This
signals the mediation framework to continue mediation with any remaining
ad networks (or other custom events).
If neither onReceivedAd
nor onFailedToReceiveAd
is called
within a certain time interval, the mediation framework assumes the custom event failed
and will continue mediation with any remaining ad networks (or other custom events).
See CustomEventBannerListener
for more
details, as well as description of other methods you can call to report events to the
mediation framework.activity
- The activity that was passed to the constructor of
AdView
. Typically, this is the activity displaying the ad. This
parameter can be passed on to an ad-network SDK expecting an activity to display the ad
in if this custom event is used to implement a call to an unsupported ad network.label
- The string configured in the publisher UI as the label for the custom event.serverParameter
- The string configured in the publisher UI as the parameter for the
custom event. If this string is not specified in the UI, this parameter will be
null
.size
- The size of the banner ad (specified in the construction of the
AdView
and configured in the publisher's account in the UI).mediationAdRequest
- An object containing some target criteria from the AdRequest
used for this AdView
.customEventExtra
- Additional parameter set by the publisher on a per-request basis.