Migrate to LevelPlay Init API
This guide explains how to transition to the LevelPlay initialization APIs to allow the use of multiple ad unit APIs.
- The min supported SDK is 8.4.0. You can download the latest SDK here.
To initialize the ironSource SDK, follow these steps: OnInitSuccess – triggered when the initialization is completed successfully. After you receive this indication, you can create and load the ad. OnInitFailed – the configuration was not retrieved successfully and ads cannot be loaded. It is recommended to try and initialize the ironSource SDK later (when internet connection is available, or when the failure reason is resolved). The Integration Demo application demonstrates how to integrate the Ad Unit APIs in your app. Download Android Demo Application Done! You are now ready to implement the new ad units APIs.Initialize the SDK
using com.unity3d.mediation;
// Init the SDK when implementing the Multiple Ad Units API for Interstitial and Banner formats, with Rewarded using legacy APIs.
LevelPlayAdFormat[] legacyAdFormats = new[] { LevelPlayAdFormat.REWARDED };
LevelPlay.OnInitSuccess += SdkInitializationCompletedEvent;
LevelPlay.OnInitFailed += SdkInitializationFailedEvent;
LevelPlay.Init(appKey,legacyAdFormats, "UserId");
LevelPlay Init Listeners
Legacy
Ad Unit (new)
Class
IronSource
LevelPlay
API
init
Init
API
setUserID
Should be set as part of the Init
Callbacks
onInitializationComplete
OnInitSuccess
–
OnInitFailed
LevelPlay mediation demo app