Skip to content

XMediator::Api::Interstitial

This class represents an Interstitial Ad format.

Inherits from IDisposable

Public Events

Name
Action< PrebiddingResults > OnPrebiddingFinished()
Notifies when the prebidding call finished, containing a PrebiddingResults object.
Action< LoadResult > OnLoaded()
Notifies when the interstitial was loaded successfully, containing a LoadResult object.
Action< LoadError, LoadResult > OnFailedToLoad()
Notifies when the interstitial failed to load, containing a LoadError object describing the error and optionally a LoadResult object.
Action< ShowError > OnFailedToShow()
Notifies when the interstitial failed to show, containing a ShowError object describing the error.
Action OnShowed()
Notifies when the interstitial was shown.
Action< ImpressionData > OnImpression()
Notifies when the interstitial impression was recorded, containing an ImpressionData object.
Action OnClicked()
Notifies when the interstitial was clicked.
Action OnDismissed()
Notifies when the interstitial was dismissed.

Public Functions

Name
Interstitial Create(string placementId, bool test =false, bool verbose =false)
Creates a new instance of a Interstitial.
void Load(CustomProperties customProperties =null)
Starts a new load call.
bool IsReady()
Indicates if the interstitial is ready to show.
void Show()
Shows a previously loaded interstitial.
void Show(string adSpace)
Shows a previously loaded interstitial.
void Dispose()
Disposes this interstitial object and can no longer be used for loading or showing.

Public Events Documentation

event OnPrebiddingFinished

Action< PrebiddingResults > OnPrebiddingFinished()

Notifies when the prebidding call finished, containing a PrebiddingResults object.

event OnLoaded

Action< LoadResult > OnLoaded()

Notifies when the interstitial was loaded successfully, containing a LoadResult object.

event OnFailedToLoad

Action< LoadError, LoadResult > OnFailedToLoad()

Notifies when the interstitial failed to load, containing a LoadError object describing the error and optionally a LoadResult object.

event OnFailedToShow

Action< ShowError > OnFailedToShow()

Notifies when the interstitial failed to show, containing a ShowError object describing the error.

event OnShowed

Action OnShowed()

Notifies when the interstitial was shown.

event OnImpression

Action< ImpressionData > OnImpression()

Notifies when the interstitial impression was recorded, containing an ImpressionData object.

event OnClicked

Action OnClicked()

Notifies when the interstitial was clicked.

event OnDismissed

Action OnDismissed()

Notifies when the interstitial was dismissed.

Public Functions Documentation

function Create

static Interstitial Create(
    string placementId,
    bool test =false,
    bool verbose =false
)

Creates a new instance of a Interstitial.

Parameters:

  • placementId A string containing a valid placement id.
  • test Whether a test interstitial should be loaded. This is only for testing purposes, should be false on production builds.
  • verbose Enable logging for this interstitial instance. This is only for debugging purposes, should be false on production builds.

Return: An Interstitial instance ready to load.

function Load

void Load(
    CustomProperties customProperties =null
)

Starts a new load call.

Parameters:

  • customProperties A CustomProperties object containing custom properties, useful for tracking.

function IsReady

bool IsReady()

Indicates if the interstitial is ready to show.

Return: true if the interstitial is ready to show, false otherwise.

function Show

void Show()

Shows a previously loaded interstitial.

function Show

void Show(
    string adSpace
)

Shows a previously loaded interstitial.

Parameters:

  • adSpace The space in your app from where the ad will be shown (eg: dashboard, settings). Used for tracking.

function Dispose

void Dispose()

Disposes this interstitial object and can no longer be used for loading or showing.


Updated on 2024-11-07 at 18:31:49 +0000