# Initialize Mediation

The Mediation SDK is automatically initialized by the Chartboost Core SDK. Review the [Core SDK](/en/mediation/integrate/core/android/) documentation for more information.

<div class="alert alert-info" role="alert">
  <b>Note:</b> Some Android API 21-24 (5.0-7.0) devices cannot initialize with Chartboost Mediation SDK due to their incompatibility with newer TLS versions and/or certificates.
</div>


## Network Kill Switch

The network kill switch is a static method `ChartboostMediationSdk.setPreinitializationConfiguration()` that must be called before Core SDK initialization is initiated. This prevents specific partners from being initialized. 

```kotlin
// Prepare a set of partner IDs that should not be initialized
ChartboostMediationSdk.setPreinitializationConfiguration(
   ChartboostMediationPreinitializationConfiguration(
       skippedPartnerIds = YOUR_SET_OF_PARTNER_IDS_TO_SKIP
   ),
)
```

| Partner                           | Identifier           |
| --------------------------------- | -------------------- |
| AdMob                             | admob                |
| Amazon Publisher Services         | amazon_aps           |
| AppLovin                          | applovin             |
| BidMachine                        | bidmachine           |
| Chartboost Monetization           | chartboost           |
| Digital Turbine Exchange (Fyber)  | fyber                |
| HyprMX                            | hyprmx               |
| Google Bidding                    | google_googlebidding |
| InMobi                            | inmobi               |
| ironSource                        | ironsource           |
| Liftoff Monetize (Vungle)         | vungle               |
| Meta Audience Network             | facebook             |
| Mintegral                         | mintegral            |
| MobileFuse                        | mobilefuse           |
| Pangle                            | pangle               |
| Unity                             | unity                |
| Verve                             | verve                |

## Consent Management Platform

A Consent Management Platform (CPM) is required and handled by the Core SDK. Review the Core SDK's [Consent Management Platform](/en/mediation/integrate/core/android/integration/#consent-management-platform) documentation to set up your CPM module. Once a CPM is chosen and setup, initialize the module.

```kotlin
// Create a usercentrics module (or any other consent management platform module)
val usercentrics = UsercentricsAdapter()
```

## Module Listener

The module listener notifies when the specified module finishes initialization so additional action can follow. This module is optional.

```kotlin
// Create a module listener
val listener = object : ModuleObserver {
    override fun onModuleInitializationCompleted(result: ModuleInitializationResult) {
        // Use this to action off of a specific module initialization
        val moduleId = result.moduleId
    }
}
```

## Initialize Chartboost Core

Initializing Chartboost Core only requires your Chartboost App ID which initializes Mediation. 

To find your Chartboost app ID, log into your [Chartboost platform](https://platform.chartboost.com/){:target="_blank"}, navigate to **Apps Management**, select your app, and the app ID will be listed on the right column under **App information**.

```kotlin
// Make sure you're in a coroutine
CoroutineScope(Main).launch {
    // Initialize ChartboostCore. You do not need to do anything additional besides providing the Chartboost app ID to initialize mediation.
    ChartboostCore.initializeSdk(context, SdkConfiguration("[chartboost app id]", listOf(usercentrics)), listener)
}
```
