> For the complete documentation index, see [llms.txt](https://docs.blueseasx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blueseasx.com/adapters/levelplay.md).

# LevelPlay

**Supported Ad Format**

* Interstitial
* Rewarded video
* Banner

### **1.  Integrate BlueSea SDK and Adapter**

### **Android**

To integrate BlueSea SDK and adapter, add dependencies like below into your `build.gradle` file

```
dependencies {
    implementation 'com.unity3d.ads-mediation:mediation-sdk:+'
    ...
    implementation 'com.blueseasx:bluesea-ads:1.8.1'
    implementation 'com.blueseasx:ironsource-adapter:1.8.1.0'
}
```

To reduce video ad loading time, BlueSea SDK allows cleartext traffic to `127.0.0.1` by default in `AndroidManifest.xml`.

* `127.0.0.1` is a local server address used for 'download while playing', which speeds up ad loading and improves impression rates.
* Allowing cleartext traffic to `127.0.0.1` complies with Google policies.

```
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    ...
    <domain-config cleartextTrafficPermitted="true">
    <domain includeSubdomains="true">127.0.0.1</domain>
    </domain-config>
    ...
</network-security-config>
```

If a `networkSecurityConfig` conflict occurs after introducing the BlueSea SDK, you can replace the `android:networkSecurityConfig` attribute in the `AndroidManifest` file.

```
<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
    <application
        ...
        android:networkSecurityConfig="@xml/network_security_config">
        tools:replace="android:networkSecurityConfig"
        ...
    </application>
</manifest>
```

The SDK requires network permissions to run. After introducing the BlueSea SDK, it will automatically add the network permission declaration in the `AndroidManifest.xml` file. Additionally, starting from Android 12, obtaining the GAID requires a declaration in the `AndroidManifest.xml`. To ensure optimal ad performance, the SDK will automatically add this declaration in the XML file, as shown below:

```
<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="com.google.android.gms.permission.AD_ID" />
    <application
        ...
        android:networkSecurityConfig="@xml/network_security_config">
        tools:replace="android:networkSecurityConfig"
        ...
    </application>
</manifest>
```

In addition, the BlueSea SDK is using third-party dependency (`io.appmetrica.analytics:analytics`) to boost publishers’ yield. If your project has already involved this dependency, please read the following description carefully to prevent potential conflicts:&#x20;

The version of this dependency BlueSea used is `7.12.0`. If your project is using a version below than `7.12.0`, we recommend you to upgrade to `7.12.0` or higher version. While you are using a version higher than `7.12.0`, then you don’t have to make any changes.

### **iOS**

Include BlueSea Ads SDK and adapter via CocoaPods. Add below snippet in your Podfile and execute `pod install --repo-update`

```
pod 'BlueSeaSDK', '1.4.1'
pod 'BlueSeaISAdapter', '1.4.1.0'
pod 'IronSourceSDK', '~> 8.11.0.0'
```

Update `SKAdnetwork IDs`. Please perform an incremental update of the IDs provided [here](/ios/skadnetwork-ids.md).

### **2. LevelPlay Setup**

### **Step1.  Add Custom Network**

Go to `LevelPlay ➣ Setup ➣ Networks`, at the bottom of the page, click `+ Add Custom Network`. On the Ad Network Setup page, enter:

* **Network Key**: `15c0f5245`
* **Account\_ID**：Your account ID on BlueSea console, please contact BlueSea am
* **Reported Revenue**: Rate Based Revenue

Click Save to complete the creation of the BlueSea Ads Custom Network.

<div align="left"><img src="/files/iYN8cvYabZYuGDRMNvBI" alt="" height="361" width="683"></div>

<div align="left"><img src="/files/xReEJBpiHQLA0mE4de13" alt="" height="353" width="688"></div>

### **Step2.  Ad Units Setup**

Go to `LevelPlay ➣ Setup ➣ Ad units`. Click `Networks` next to the target Ad Unit. On the Instances page, click BlueSea Ads to open the App Settings page. Fill in the following fields:

* **App ID**: Enter the App ID generated when creating the app in the BlueSea dashboard.
* **Placement ID**: Enter the Placement ID created in the BlueSea dashboard.
* **Rate**: Enter the Floor Price set for the Placement ID in the BlueSea dashboard.

Click Save to complete the BlueSea Ad Unit configuration.

<div align="left"><img src="/files/cORFEQ2PmpyF2v1zgFI2" alt="" height="307" width="695"></div>

<div align="left"><img src="/files/MnYESuaIkAQrP7m8IlBK" alt="" height="306" width="700"></div>

<div align="left"><img src="/files/okpSXvFVDCJzA10vrfXA" alt="" height="343" width="700"></div>

### **3. Testing & Verification**

You can verify whether the BlueSea SDK and Adapter are integrated successfully using the steps below.

### **Step 1. Configure BlueSea Test Device IDs**

Log in BlueSea’s console, navigate to `Integration > Test Device IDs`. Add the GAID/IDFA

<div align="left"><img src="/files/FpXfjpE8KMZzHYxHeX2e" alt="" height="291" width="725"></div>

### **Step2.  Configure LevelPlay Test Devices**

Go to `LevelPlay ➣ Setup ➣ Test devices.` Add your test device and click Save. On the test page, select `Network: BlueSea`. Choose the Ad Format you want to test. Click Test Ads to verify that BlueSea ads display correctly on the LevelPlay test demo.

<div align="left"><img src="/files/FWY9WZj14QizMVWmm5uJ" alt="" height="328" width="693"></div>

<div align="left"><img src="/files/mKEmJbMiKWmrwf2OshzD" alt="" height="331" width="697"></div>

### **Step3.  Test Ad**

Request and view ads. The following ad format is the BlueSea ad.

<div align="left"><img src="/files/XNJ8aFqTFYNDlDlTdaOr" alt="" height="496" width="244"></div>

<br>
