# Integrate Network SDKs

## Partner Adapter Integration

Mediation adapters are required to use other ad networks with Mediation.

### Adapter Versioning Scheme

The partner adapter versions uses floating pegs and are formatted as follows:

```
<chartboost_mediation_sdk_major_version>.<partner_sdk_version>.<adapter_revision>
```
- **Chartboost Mediation SDK Major Version**: The major version of the Chartboost Mediation SDK that the adapter is compatible with.
- **Partner SDK Version**: The full partner SDK version that the adapter is compatible with. Note that this could be the traditional `major.minor.patch` version scheme, but there are some partners that have a `major.minor.patch.revision` version scheme.
- **Adapter Revision**: The revision number of the adapter itself, starting from 0. This is incremented when a new adapter version is released for the same partner SDK version.

Examples:

| Partner    | Adapter Version | Chartboost Mediation SDK Major Version | Compatible Partner SDK Version | Adapter Revision |
| :--------- | :-------------- | :------------------------------------- | :----------------------------- | :--------------- |
| AdMob      | 4.21.5.0.2      | 4                                      | 21.5.0                         | 2                |
| IronSource | 5.7.2.5.1.0     | 5                                      | 7.2.5.1                        | 0                |

### Adapter Integration

Utilize our [Chartboost Mediation Adapters](https://adapters.chartboost.com/){:target="_blank"} below to compare which partners are ideal for you to integrate with. You can filter by ad format from the top right menu and compare selected partners. Click into the chosen partner for the latest supported partner adapter versions and integration guide or visit their [adapter repository](/en/mediation/integrate/android/integrate-network-sdks/#adapter-repositories){:target="_blank"}.

**Be sure you are navigated to the Android specific adapters from the top right menu.**

<iframe src="https://adapters.chartboost.com/" height="700" width="100%" style="border:1px solid black;" title="Chartboost Mediation Adapter"></iframe>

### Adapter Repositories





<table>
	<thead>
		<tr>
			<th>Partner Network</th>
			<th>Android Repository</th>
		</tr>
	</thead>
	<tbody>
		
		
		<tr>
			<td>AdMob</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-admob">https://github.com/ChartBoost/chartboost-mediation-android-adapter-admob</a></td>
		</tr>
		
		
		<tr>
			<td>Amazon Publisher Services</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-amazon-publisher-services">https://github.com/ChartBoost/chartboost-mediation-android-adapter-amazon-publisher-services</a></td>
		</tr>
		
		
		<tr>
			<td>AppLovin</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-applovin">https://github.com/ChartBoost/chartboost-mediation-android-adapter-applovin</a></td>
		</tr>
		
		
		<tr>
			<td>BidMachine</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-bidmachine">https://github.com/ChartBoost/chartboost-mediation-android-adapter-bidmachine</a></td>
		</tr>
		
		
		<tr>
			<td>Chartboost Monetization</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-chartboost">https://github.com/ChartBoost/chartboost-mediation-android-adapter-chartboost</a></td>
		</tr>
		
		
		<tr>
			<td>Digital Turbine Exchange (Fyber)</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-digital-turbine-exchange">https://github.com/ChartBoost/chartboost-mediation-android-adapter-digital-turbine-exchange</a></td>
		</tr>
		
		
		<tr>
			<td>Google Bidding</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-google-bidding">https://github.com/ChartBoost/chartboost-mediation-android-adapter-google-bidding</a></td>
		</tr>
		
		
		<tr>
			<td>HyprMX</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-hyprmx">https://github.com/ChartBoost/chartboost-mediation-android-adapter-hyprmx</a></td>
		</tr>
		
		
		<tr>
			<td>InMobi</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-inmobi">https://github.com/ChartBoost/chartboost-mediation-android-adapter-inmobi</a></td>
		</tr>
		
		
		<tr>
			<td>Liftoff Monetize (Vungle)</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-vungle">https://github.com/ChartBoost/chartboost-mediation-android-adapter-vungle</a></td>
		</tr>
		
		
		<tr>
			<td>ironSource</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-ironsource">https://github.com/ChartBoost/chartboost-mediation-android-adapter-ironsource</a></td>
		</tr>
		
		
		<tr>
			<td>Meta Audience Network</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-meta-audience-network">https://github.com/ChartBoost/chartboost-mediation-android-adapter-meta-audience-network</a></td>
		</tr>
		
		
		<tr>
			<td>Mintegral</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-mintegral">https://github.com/ChartBoost/chartboost-mediation-android-adapter-mintegral</a></td>
		</tr>
		
		
		<tr>
			<td>MobileFuse</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-mobilefuse">https://github.com/ChartBoost/chartboost-mediation-android-adapter-mobilefuse</a></td>
		</tr>
		
		
		<tr>
			<td>Pangle</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-pangle">https://github.com/ChartBoost/chartboost-mediation-android-adapter-pangle</a></td>
		</tr>
		
		
		<tr>
			<td>Unity Ads</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-unity-ads">https://github.com/ChartBoost/chartboost-mediation-android-adapter-unity-ads</a></td>
		</tr>
		
		
		<tr>
			<td>Verve</td>
			<td><a href="https://github.com/ChartBoost/chartboost-mediation-android-adapter-verve">https://github.com/ChartBoost/chartboost-mediation-android-adapter-verve</a></td>
		</tr>
		
	</tbody>
</table>



## Partner SDK Integration

<table>
<tbody>
  <tr>
    <th style="width:40%">Partner SDK Integration Docs</th>
    <th style="width:60%">Additional Integration Notes</th>
  </tr>

  <tr>
    <td><a href="https://developers.google.com/admob/android/quick-start" target="_blank">AdMob/Google Bidding</a></td>
    <td>The latest versions of AdMob require the usage of <a href="https://developer.android.com/jetpack/androidx/migrate" target="_blank">AndroidX support libraries.</a></td>
  </tr>

  <tr>
    <td><a href="https://ams.amazon.com/webpublisher/uam/docs/aps-mobile/android" target="_blank">Amazon Publisher Services</a></td>
    <td></td>
  </tr>

  <tr>
    <td><a href="https://dash.applovin.com/docs/integration#androidIntegration" target="_blank">AppLovin</a></td>
    <td></td>
  </tr>

  <tr>
    <td>Bidmachine</td>
    <td>To integrate with Bidmachine SDK, contact your Bidmachine account manager.</td>
  </tr>

  <tr>
    <td><a href="/en/monetization/integrate/android/get-started/" target="_blank">Chartboost Monetization</a></td>
    <td></td>
  </tr>

  <tr>
    <td><a href="https://developer.digitalturbine.com/hc/en-us/articles/360010822437-Integrating-the-Android-SDK" target="_blank">Digital Turbine Exchange (Fyber)</a></td>
    <td></td>
  </tr>

  <tr>
    <td><a href="https://documentation.hyprmx.com/android-sdk/" target="_blank">HyprMX</a></td>
    <td>
      <ul>
        <li>HyprMX requires a <a href="https://documentation.hyprmx.com/android-sdk/#userid" target="_blank">unique generated identifier</a> that needs to be static across sessions during its SDK initialization.</li>
        <li>The <code>ageRestrictedUser</code> flag needs to be set before the Chartboost Mediation initializes to appropriately apply child-directed treatment to a user.</li>
      </ul>
    </td>
  </tr>

  <tr>
    <td><a href="https://support.inmobi.com/monetize/sdk-documentation/android-guidelines/overview-android-guidelines" target="_blank">InMobi</a></td>
    <td></td>
  </tr>

  <tr>
    <td><a href="https://developers.ironsrc.com/ironsource-mobile/android/android-sdk" target="_blank">ironSource</a></td>
    <td>ironSource provides their own Maven Repository, therefore does not use Maven Central to distribute their SDKs.</td>
  </tr>

  <tr>
    <td><a href="https://support.vungle.com/hc/en-us/articles/360002922871" target="_blank">Liftoff Monetize (Vungle)</a></td>
    <td></td>
  </tr>

  <tr>
    <td><a href="https://developers.facebook.com/docs/audience-network/android" target="_blank">Meta Audience Network</a></td>
    <td>In addition, publishers may be needed to include the following in their network security config file (<code>network_security_config.xml</code>).
      <br><br>
      <ul class="tab" data-tab="8b53f23b-e614-4d48-8e06-91c0b7530a57" data-name="MetaAudienceNetworkSDKIntegration">
  
      <li class="active">
          <a href="#">XML </a>
      </li>
  
</ul>
<ul class="tab-content" id="8b53f23b-e614-4d48-8e06-91c0b7530a57" data-name="MetaAudienceNetworkSDKIntegration">
  
      <li class="active">
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp">&lt;?xml version="1.0" encoding="utf-8"?&gt;</span>
<span class="nt">&lt;network-security-config&gt;</span>
  <span class="nt">&lt;domain-config</span> <span class="na">cleartextTrafficPermitted=</span><span class="s">"true"</span><span class="nt">&gt;</span>
    <span class="nt">&lt;domain</span> <span class="na">includeSubdomains=</span><span class="s">"true"</span><span class="nt">&gt;</span>127.0.0.1<span class="nt">&lt;/domain&gt;</span>
  <span class="nt">&lt;/domain-config&gt;</span>
<span class="nt">&lt;/network-security-config&gt;</span>
</code></pre></div></div>

</li>
  
</ul>

      And update <code>AndroidManifest.xml</code>
      <br><br>
      <ul class="tab" data-tab="95c8d051-6621-4fbd-bf86-337154d6edc7" data-name="MetaAudienceNetworkSDKIntegration2">
  
      <li class="active">
          <a href="#">XML </a>
      </li>
  
</ul>
<ul class="tab-content" id="95c8d051-6621-4fbd-bf86-337154d6edc7" data-name="MetaAudienceNetworkSDKIntegration2">
  
      <li class="active">
<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp">&lt;?xml version="1.0" encoding="utf-8"?&gt;</span>
<span class="nt">&lt;manifest</span> <span class="err">...</span> <span class="nt">&gt;</span>
<span class="nt">&lt;application</span> <span class="na">android:networkSecurityConfig=</span><span class="s">"@xml/network_security_config"</span>
<span class="err">...</span> <span class="nt">&gt;</span>
...
<span class="nt">&lt;/application&gt;</span>
<span class="nt">&lt;/manifest&gt;</span>
</code></pre></div></div>

</li>
  
</ul>

      For more information on Meta network security configuration check <a href="https://developers.facebook.com/docs/audience-network/android-network-security-config" target="_blank">Network Security Config</a>.
    </td>
  </tr>

  <tr>
    <td><a href="https://cdn-adn.rayjump.com/cdn-adn/v2/markdown_v2/index.html?file=sdk-m_sdk-android&lang=en" target="_blank">Mintegral</a></td>
    <td>Mintegral provides their own Maven Repository, therefore does not use Maven Central to distribute their SDKs.</td>
  </tr>

  <tr>
    <td><a href="https://www.pangleglobal.com/integration/integrate-pangle-sdk-for-android" target="_blank">Pangle</a></td>
    <td></td>
  </tr>

  <tr>
    <td><a href="https://unityads.unity3d.com/help/android/integration-guide-android" target="_blank">Unity Ads</a></td>
    <td></td>
  </tr>


</tbody>
</table>

## Partner Consents

All privacy and consent information is configured via the Chartboost Core SDK's [Consent Management Platform](/en/mediation/integrate/core/android/integration/#consent-management-platform).

The Mediation SDK will utilize the TCFv2 string as part of auction requests, and will forward consent changes to the partner adapters. 

The following partners utilize complex non-IAB compliant privacy and consent signals that cannot be extrapolated from Core SDK consent signals. Last resort APIs will be exposed via that partner adapter’s `AdapterConfiguration` class and must be manually set.

#### HyprMX

```kotlin
// Set consent status directly on the adapter configuration
HyprMXAdapterConfiguration.setConsentStatusOverride(context, CONSENT_GIVEN)
```

#### Pangle

```kotlin
// Set consent status directly on the adapter configuration
PangleAdapterConfiguration.setGdprConsentOverride(consent) // this is an int
PangleAdapterConfiguration.setDoNotSellOverride(doNotSell) // this is an int
```

#### Unity Ads

```kotlin
// Set consent status directly on the adapter configuration
UnityAdsAdapterConfiguration.setGdprConsentOverride(context, true)
UnityAdsAdapterConfiguration.setPrivacyConsentOverride(context, true)
```

#### Vungle
```kotlin
// Set consent status directly on the adapter configuration
VungleAdapterConfiguration.setGdprStatusOverride(true)
VungleAdapterConfiguration.setCcpaStatusOverride(true)
```


<!-- New starting 4.7.0 -->
<!-- Does not apply to 5.X 

## Setting Individual Partner Consents

Partner consent can be set on an individual basis using the following API. Using these partner consents will override the global GDPR and CCPA consent used for the Chartboost Mediation SDK with the partner-specific values.

Get the `PartnerConsents` object to be able to set consent on a per-partner basis.

```kotlin
HeliumSdk.partnerConsents: PartnerConsent

PartnerConsent {
    /**
     * Gets a copy of the partner ID to consent given map.
     */
    fun getPartnerIdToConsentGivenMapCopy(): Map<String, Boolean>

    /**
     * Adds a single partner's consent. This value is persisted between app launches.
     *
     * @param partnerId The partner ID.
     * @param consentGiven True if there is consent for this partner, false otherwise.
     */
    fun setPartnerConsent(partnerId: String, consentGiven: Boolean)

    /**
     * Adds a map of partner IDs to consent given. These values are persisted between app launches.
     * This is only additive. If you'd like to remove a consent for a particular partner, please
     * use removePartnerConsent().
     *
     * @param partnerIdToConsentGivenMap The map of partner IDs to consent given.
     */
    fun addPartnerConsents(partnerIdToConsentGivenMap: Map<String, Boolean>)

    /**
     * Remove a partner consent.
     *
     * @param partnerId The partner ID.
     * @return The previous consent state of this partner.
     */
    fun removePartnerConsent(partnerId: String): Boolean?

    /**
     * Clears and adds a map of partner IDs to consent given. These values are persisted between app
     * launches.
     */
    fun replacePartnerConsents(partnerIdToConsentGivenMap: Map<String, Boolean>)

    /**
     * Clears all partner consents. This change will persist to disk.
     */
    fun clear()
}

```

### Getting Current Partner Consents
```kotlin
val partnerConsents = HeliumSdk.getPartnerConsents(context)
```

### Setting Single Partner Consent
```kotlin
partnerConsents.setPartnerConsent("admob", true)
```

### Setting Multiple Partner Consents
```kotlin
partnerConsents.addPartnerConsents(mapOf("chartboost" to true, "admob" to false))
```

### Removing Partner Consent
```kotlin
val previousConsent = partnerConsents.removePartnerConsent("chartboost")
```

### Replacing All Partner Consents
```kotlin
partnerConsents.replacePartnerConsents(mapOf("chartboost" to "false", "admob" to "true"))
```

### Clearing All Partner Consents
Globally set consents will re-apply if partner consents are cleared.
```kotlin
partnerConsents.clear()
```


### Partner Identifiers

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

-->
