Interstitial class

Warning.

This is an archived version of the documentation. Actual documentation for all platforms can be found here.

A class for displaying interstitial ads.

Methods

Interstitial(string blockId)

Creates an object of the Interstitial class with the specified parameters.

void LoadAd(AdRequest request)

Starts ad loading in the background.

void IsLoaded()

Returns the result of ad loading.

void Show()

Displays the ad if it was loaded.

void Destroy()

Destroys an object of the Interstitial class and clears its occupied resources.

Interstitial(string blockId)

Creates an object of the Interstitial class with the specified parameters.

void LoadAd(AdRequest request)

Starts ad loading in the background.

void IsLoaded()

Returns the result of ad loading.

void Show()

Displays the ad if it was loaded.

void Destroy()

Destroys an object of the Interstitial class and clears its occupied resources.

Events

event EventHandler<EventArgs> OnInterstitialLoaded

Called when the ad is loaded.

.
event EventHandler<AdFailureEventArgs> OnInterstitialFailedToLoad

Called if ad loading fails.

event EventHandler<EventArgs> OnReturnedToApplication

Called when the user returns to the app after the click.

event EventHandler<EventArgs> OnLeftApplication

Called when the app becomes inactive because the user has clicked on an ad and is about to switch to a different app (for example, a browser).

event EventHandler<EventArgs> OnAdClicked

It's called when the user clicks on your ad.

event EventHandler<EventArgs> OnInterstitialShown

Called when an interstitial ad is displayed.

event EventHandler<EventArgs> OnInterstitialDismissed

Called when an interstitial ad is closed.

event EventHandler<ImpressionData> OnImpression

It's called when an ad impression has been counted.

event EventHandler<AdFailureEventArgs> OnInterstitialFailedToShow

Called when the ad can't be shown.

event EventHandler<EventArgs> OnInterstitialLoaded

Called when the ad is loaded.

.
event EventHandler<AdFailureEventArgs> OnInterstitialFailedToLoad

Called if ad loading fails.

event EventHandler<EventArgs> OnReturnedToApplication

Called when the user returns to the app after the click.

event EventHandler<EventArgs> OnLeftApplication

Called when the app becomes inactive because the user has clicked on an ad and is about to switch to a different app (for example, a browser).

event EventHandler<EventArgs> OnAdClicked

It's called when the user clicks on your ad.

event EventHandler<EventArgs> OnInterstitialShown

Called when an interstitial ad is displayed.

event EventHandler<EventArgs> OnInterstitialDismissed

Called when an interstitial ad is closed.

event EventHandler<ImpressionData> OnImpression

It's called when an ad impression has been counted.

event EventHandler<AdFailureEventArgs> OnInterstitialFailedToShow

Called when the ad can't be shown.

Method description

Interstitial(string blockId)

public Interstitial(string blockId)

Creates an object of the Interstitial class with the specified parameters.

Parameters:
blockId A unique identifier of the advertising space that is set in the Partner interface in the format demo-banner-yandex.
blockId A unique identifier of the advertising space that is set in the Partner interface in the format demo-banner-yandex.

Returns:

An object of the Interstitial class with the specified parameters.

void LoadAd(AdRequest request)

public void LoadAd(AdRequest request)

Starts ad loading in the background.

Parameters:
request An object of the AdRequest class including the data for a targeted ad request.
request An object of the AdRequest class including the data for a targeted ad request.

bool isLoaded()

public bool isLoaded()

Returns the result of ad loading.

Returns:

true when the ad is loaded and ready to be displayed. false if the ad is not loaded or not ready to be displayed.

void Show()

public void Show()

Displays the ad if it was loaded.

void Destroy()

public void Destroy()

Destroys an object of the Interstitial class and clears its occupied resources.

Event description

event EventHandler<EventArgs> OnInterstitialLoaded

public event EventHandler<EventArgs> OnInterstitialLoaded

Called when the ad is loaded.

event EventHandler<AdFailureEventArgs> OnInterstitialFailedToLoad

public event EventHandler<AdFailureEventArgs> OnInterstitialFailedToLoad

Called if ad loading fails.

event EventHandler<EventArgs> OnReturnedToApplication

public event EventHandler<EventArgs> OnReturnedToApplication

Called when the user returns to the app after the click.

event EventHandler<EventArgs> OnLeftApplication

public event EventHandler<EventArgs> OnLeftApplication

Called when the app becomes inactive because the user has clicked on an ad and is about to switch to a different app (for example, a browser).

event EventHandler<EventArgs> OnAdClicked

public event event EventHandler<EventArgs> OnAdClicked

It's called when the user clicks on your ad.

event EventHandler<EventArgs> OnInterstitialShown

public event event EventHandler<EventArgs> OnInterstitialShown

Called when an interstitial ad is displayed.

event EventHandler<EventArgs> OnInterstitialDismissed

public event event EventHandler<EventArgs> OnInterstitialDismissed

Called when an interstitial ad is closed.

event EventHandler<ImpressionData> OnImpression

public event event EventHandler<ImpressionData> OnImpression

It's called when an ad impression has been counted.

event EventHandler<AdFailureEventArgs> OnInterstitialFailedToShow

public event event EventHandler<AdFailureEventArgs> OnInterstitialFailedToShow

Called when the ad can't be shown.