Initialize Mediation

Adding the Import Header

Add the following import header to the top of any class file that will be using a Mediation class:

using HeliumSDK;

Initializing Mediation SDK

Using the Mediation AppId and AppSignature from your dashboard setup, initialize the Mediation SDK with the following code. We recommend initializing in the void Start() method:




Make sure your AppID is in the Mediation SDK settings window.

Alternatively, you can initialize the Mediation SDK with the following code, and supply your AppID and AppSignature directly.

HeliumSdk.StartWithAppIdAndAppSignature(APP_ID, APP_SIGNATURE);

Make sure these are the Mediation AppId and AppSignature values that you obtain directly from your Mediation Dashboard for your app as opposed to credentials from Chartboost or any other Ad Network.

Once the Mediation SDK has successfully started, you can start showing ads.



Failing to remove fillers such as HELIUMAPP_IDand HELIUM_APP_SIGNATURE will result in an error.

Advanced Settings

Initialization Metrics

The Mediation SDK contains an optional callback for receiving SDK initialization metrics in a JSON format. To utilize the API, use the following code snippets:

// callback subscription
HeliumSDK.DidReceivePartnerInitializationData += DidReceivePartnerInitializationData;

// Partner initialization data callback
private void DidReceivePartnerInitializationData(string partnerInitializationData)
   Debug.Log($"DidReceivePartnerInitializationData: ${partnerInitializationData}");

Network Kill Switch

The Mediation SDK initialization method has been expanded to take in optional initialization parameters. One of those parameters is a set of network adapter identifiers to skip initialization for the session.



Do not disable the Chartboost network or else the Mediation SDK will not initialize.

// When initializing manually, use the accessor. Otherwise, use the scriptable object.
HeliumSettings.PartnersKillSwitch = HeliumPartners.AdMob | HeliumPartners.Facebook | HeliumPartners.TapJoy;

var appID = "SAMPLE_APP_ID";
var appSignature = "SAMPLE_APP_SIGNATURE";

HeliumSDK.StartWithAppIdAndAppSignature(appID, appSignature);