public interface CustomEventInterstitial extends CustomEvent
When the mediation framework schedules the custom event to be executed, the
requestInterstitialAd(com.google.ads.mediation.customevent.CustomEventInterstitialListener, android.app.Activity, java.lang.String, java.lang.String, com.google.ads.mediation.MediationAdRequest, java.lang.Object)
method is called.
Modifier and Type | Method and Description |
---|---|
void |
requestInterstitialAd(CustomEventInterstitialListener listener,
Activity activity,
String label,
String serverParameter,
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.
|
void |
showInterstitial() |
destroy
void requestInterstitialAd(CustomEventInterstitialListener listener, Activity activity, String label, String serverParameter, 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. Afterwards, calling
InterstitialAd.show()
would cause the mediation framework to call
the showInterstitial()
method of this object. 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 CustomEventInterstitialListener
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
InterstitialAd
. 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
.mediationAdRequest
- An object containing some target criteria from the AdRequest
used for this InterstitialAd
.customEventExtra
- Additional parameter set by the publisher on a per-request basis.void showInterstitial()