com.google.ads.mediation.customevent
Interface CustomEventInterstitial


public interface CustomEventInterstitial

The interface for a custom event with an interstitial ad type.

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) method is called.


Method Summary
 void requestInterstitialAd(CustomEventInterstitialListener listener, Activity activity, String label, String serverParameter, MediationAdRequest mediationAdRequest)
          This method is called by the mediation framework on the UI thread when the custom event object is scheduled to be executed.
 void showInterstitial()
           
 

Method Detail

requestInterstitialAd

void requestInterstitialAd(CustomEventInterstitialListener listener,
                           Activity activity,
                           String label,
                           String serverParameter,
                           MediationAdRequest mediationAdRequest)
This method is called by the mediation framework on the UI thread when the custom event object is scheduled to be executed. Results of the custom event execution should be reported back to the mediation framework by calling an appropriate method of the 'listener' argument.

Parameters:
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.

showInterstitial

void showInterstitial()