ドキュメント

サポート

LevelPlay SDK - Android

Migrate to LevelPlay Init API

Facilitate migration to the LevelPlay initialization API in your ironSource Android app by updating SDK initialization to support multiple ad unit APIs, including interstitial, banner, and rewarded ads.
読み終わるまでの所要時間 1 分最終更新 3日前

This guide explains how to transition to the LevelPlay initialization APIs to allow the use of multiple ad unit APIs.

Prerequisites

The minimum supported SDK is 8.4.0. You can download the latest SDK here.

Initialize the SDK

To initialize the LevelPlay SDK, follow these steps:
  1. Implement callbacks for initialization success and failure.
  2. Call the LevelPlay init API using the appKey and user ID if relevant.
LevelPlayInitRequest initRequest = new LevelPlayInitRequest.Builder(appKey) .withUserId("UserID") .build();LevelPlayInitListener initListener = new LevelPlayInitListener() { @Override public void onInitFailed(@NonNull LevelPlayInitError error) { // Recommended to initialize again } @Override public void onInitSuccess(LevelPlayConfiguration configuration) { // Create ad objects and load ads }};LevelPlay.init(context, initRequest, initListener);

LevelPlay Init Listeners

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 LevelPlay SDK later (when internet connection is available, or when the failure reason is resolved).

Legacy

Ad Unit (new)

ClassIronSourceLevelPlay
APIinitinit
setUserIDShould be set as part of LevelPlayInitRequest builder
CallbacksonInitializationCompleteonInitSuccess
-onInitFailed

LevelPlay mediation demo app

The Integration Demo application demonstrates how to integrate the Ad Unit APIs in your app. Download the relevant Demo Application. You can now implement the new ad units APIs.