> For the complete documentation index, see [llms.txt](https://madex.gitbook.io/madex-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://madex.gitbook.io/madex-documentation/android-sdk/adapters-for-other-sdks/applovin-max-sdk.md).

# Applovin MAX SDK

Release version **1.6.3** | Release date **07/30/2025**

{% hint style="info" %}
Minimum requirements:

* Use the Android API level 22 (Android OS 5.1) and above.&#x20;
  {% endhint %}

## Test identifiers&#x20;

When integrating the SDK, we strongly recommend to use specific `publisher_id` and`placement_name` to ensure the stability of test ads.

To prioritize the display of the Madex network during the installation verification process, please set the CPM price to $5000 for the Madex network.

`Publisher ID` - `d42994c6-2145-4269-9c2f-2adcf9d9703f`

`Madex Interstitial ID` - `50f37030-162d-4e8c-a9c0-e078d8fbf2f7`

`Madex Rewarded ID` - `dacd566d-8487-4bc6-8afc-486f625be870`

`Madex Banner ID` - `901a609e-b9b2-4f82-b8b8-c899c5524867`

## Installation

### Prepare the Gradle

{% hint style="warning" %}
Android 11 has changed the way it requests applications and interacts with other applications installed by the user on the device. For this reason, make sure that you are using a version of Cradle that matches one of the ones listed [here](https://developer.android.com/studio/releases/gradle-plugin#4-0-0).
{% endhint %}

1. Complete the `settings.gradle` file with the repository necessary for installing the SDK. \
   \
   Check out your version of Android Studio, and paste the appropriate code into `settings.gradle` at the root of the project. \
   \
   An example of connecting a repository in `settings.gradle`.

{% tabs %}
{% tab title="Starting from Arctic Fox and above" %}

```groovy
// project-level settings.gradle

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        // ... other repositories
        
        // connecting the Madex SDK repository
        maven { url  "https://sdkpkg.sspnet.tech" }
    }
}
```

{% endtab %}

{% tab title="For the version before Arctic Fox" %}

```groovy
// project-level settings.gradle

allprojects {
    repositories {
        // ... other project repositories
        
        // connecting the Madex SDK repository
        maven { url  "https://sdkpkg.sspnet.tech" }
    }
}
```

{% endtab %}
{% endtabs %}

2. Complete the `build.gradle` with the necessary build parameters for the correct installation of the SDK.

```groovy
// app-level build.gradle

android {
  // ... other settings
     
   defaultConfig {
     // ... other settings
       
     multiDexEnabled true // Enable multidex
   }
 
   compileOptions {
       sourceCompatibility JavaVersion.VERSION_1_8
       targetCompatibility JavaVersion.VERSION_1_8
   }
}
```

3. In the same build.gradle file connect the dependencies to install the Madex adapter for Applovin MAX SDK.

```groovy
dependencies {
    // ... other dependencies
    
    // connection of Madex SDK dependency
    implementation 'sspnet.tech:madex:1.7.7'
    
    // connection of Applovin SDK dependency
    implementation 'com.applovin:applovin-sdk:13.0.0'
    
    // connection of Applovin Adapter dependency for Madex SDK
    implementation 'sspnet.tech.madex.networks:applovin:1.6.3'
}
```

4. Save the file and click `Gradle Sync`.

## Initializing the Applovin Max SDK

Initialize the Applovin Max SDK by following the official [Applovin documentation](https://dash.applovin.com/documentation/mediation/unity/getting-started/integration).

To add the Madex advertising network in the personal account of the Applovin advertising network, follow [the instructions](https://dash.applovin.com/documentation/mediation/ui-max/networks/connect-networks) for adding a custom advertising network.

Fill in the fields with the following parameters:

`Network Type` - `SDK`

`Custom Network Name` - `Madex`

`Android Adapter Class Name` - `sspnet.tech.madex.networks.applovin.MadexMediationAdapter`

`iOS Adapter Class Name` - `MadexMediationAdapter`

In the `App ID` field, specify the test `Publisher ID`.

## Checking the correct ad call

Use text identifiers, set the CPM Price = 5000$ value for the Madex network, download and call the advertisement.&#x20;

If the ad was successfully loaded and displayed, then the adapter is installed correctly.

Install CPM according to the agreements with Madex managers, replace the `Publisher ID` in the `App ID` field and the ID of the ad blocks in the application code with your IDs in the Madex personal account.

Your `publisher_id` is located in the "Settings" section of your Madex personal account.

<figure><img src="https://626582791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwiiOaJhSveT4OR9bjTvw%2Fuploads%2FHQrO1nEniggoTJRwI9Ih%2Fimage.png?alt=media&amp;token=08d0404b-ad0a-43ea-a18e-7cb0731622c3" alt=""><figcaption></figcaption></figure>

You can copy the ad block ID on the application page in the Madex personal account. You can also create additional ad blocks there.

<figure><img src="https://626582791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwiiOaJhSveT4OR9bjTvw%2Fuploads%2FF0B6otctP8n3fTsrH3bZ%2Fimage.png?alt=media&amp;token=1a6e26ee-1455-4c07-a814-a544a08ca0bc" alt=""><figcaption></figcaption></figure>

## If the adapter is installed incorrectly

In case of errors, we recommend clearing the `Gradle` cache.

<figure><img src="https://626582791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwiiOaJhSveT4OR9bjTvw%2Fuploads%2FMdxKArzWTBBTKox9Z9Ut%2Fimage.png?alt=media&amp;token=5d91153b-3f0d-4dd8-9691-2a1e009777c1" alt=""><figcaption></figcaption></figure>

If this does not help, contact support.
