> 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/client-bidding/android/integrate-sdk.md).

# Integrate SDK

minSdkVersion 19 and above are required, and Android SDK Version must be V1.4.0 and above.

Add the following into your App’s  build.gradle  file:

```
dependencies {
    ...
    implementation 'com.blueseasx:bluesea-ads:1.8.1'
}
```

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.
