The MVP Unity Developer Hub

Welcome to the MVP Unity developer hub. You'll find comprehensive guides and documentation to help you start working with MVP Unity as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Interstitial

Introduction

Interstitials are static or video ads presented before, during or after the user interacts with your app.
The user can view and then immediately dismiss them. This is a non-rewarded format for the user.

The supports both static and video interstitials.

Important

The speed and stability of users internet connections may vary. It is highly recommended to fetch as much in advance of showing an ad as possible. This helps to ensure that all necessary assets are downloaded. For example, you may want to fetch an ad when a level starts or after a previous ad has been shown.

Making the Request

Below is an example of making a request for an Interstitial.

string placementId = "1234";
Interstitial.Request(placementId);

Adding Callbacks

The callback code below is required for the SDK to properly track the activity of your ad

public class MyInterstitialListener : InterstitialListener
{

    public void OnShow(string placementId)
    {
        // Called when an Interstitial from placement shows up. In case the ad is a video, audio play will start here.
    }

    public void OnClick(string placementId)
    {
        // Called when an Interstitial from placement is clicked
    }

    public void OnHide(string placementId)
    {
        // Called when an Interstitial from placement hides.
    }

    public void OnShowFailure(string placementId)
    {
        // Called when an error arises when showing an Interstitial from placement
    }

    public void OnAvailable(string placementId)
    {
        // Called when an Interstitial from placement becomes available
    }

    public void OnUnavailable(string placementId)
    {
        // Called when an Interstitial from placement becomes unavailable
    }
}



Interstitial.SetInterstitialListener(new MyInterstitialListener());

Example showing an ad

The following example checks to see if a is available and if it is, uses the show request to display the ad.

string placementId = "1234";

if (Interstitial.IsAvailable(placementId)) {
	Interstitial.Show(placementId);
}

Stop Requesting An Ad

If a placement is no longer relevant for your user, you can stop requesting it. Continuous requesting of placements that are no longer available, negatively impact the performance of your placements.

string placementId = "1234";

Interstitial.StopRequesting(placementId);

Important

Use stopRequesting to disable the FairBid SDK Auto-Request functionality for a specific placement. If you continue requesting ads for placements that are not shown, the performance of your placement can be impacted.


Interstitial


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.