Preparing mediated networks

When you integrate third-party SDKs into your Mobile Property, you are solely responsible for such integrations. You and the third-party SDK provider must ensure compliant data processing and treatment of any user-based or device-based privacy choices or flags.

    Android

    You can download and integrate the MAX mediation adapters into your app in two ways:

    Gradle
    AppLovin recommends that you integrate adapters this way. AppLovin’s adapters’ POM files automatically integrate the mediated network’s SDK and its dependencies.
    Open source adapters
    If you require more flexibility in the integration, you can integrate AppLovin’s open source adapters. You are responsible for integrating the mediated SDKs and their dependencies. You can find these adapters in the AppLovn-MAX-SDK-Android GitHub repository.

    Do not change the adapter’s name or package name. If you do so, the MAX SDK cannot recognize the adapter and ads will not load.

    Gradle

    Choose which mediated ad networks you want to integrate by checking the boxes below. When you check those boxes, this page displays instructions specific to those networks.

    This page also creates a customized UPL for you. Copy the customized UPL below into AppLovinMAX_UPL_Android.xml.

  • BidMachine
  • BIGO Ads
  • Chartboost
  • DT Exchange
  • Google Ad Manager
  • Google Bidding and Google AdMob
  • HyprMX
  • InMobi
  • ironSource
  • Liftoff Monetize
  • LINE
  • Maio
  • Meta Audience Network
  • Mintegral
  • MobileFuse
  • Moloco
  • Ogury
  • Pangle
  • PubMatic
  • Smaato
  • Unity Ads
  • Verve
  • VK Ad Network
  • Yandex
  • YSO Network
  • <AARImports>
        <insertValue value="com.applovin.mediation,bidmachine-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,bigoads-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,chartboost-adapter,+" /> <insertNewline/>
        <insertValue value="com.google.android.gms,play-services-base,16.1.0" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,fyber-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,google-ad-manager-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,google-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,hyprmx-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,inmobi-adapter,+" /> <insertNewline/>
        <insertValue value="com.squareup.picasso,picasso,2.8" /> <insertNewline/>
        <insertValue value="androidx.recyclerview,recyclerview,1.1.0" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,ironsource-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,vungle-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,line-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,maio-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,facebook-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,mintegral-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,mobilefuse-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,moloco-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,ogury-presage-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,bytedance-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,pubmatic-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,smaato-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,unityads-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,verve-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,mytarget-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,yandex-adapter,+" /> <insertNewline/>
        <insertValue value="com.applovin.mediation,yso-network-adapter,+" /> <insertNewline/>
    
    </AARImports>
    
    <buildGradleAdditions>
        <insert>
            allprojects {
                // You may add any additional repositories for other ad networks here
                repositories {
                    maven { url "https://artifactory.bidmachine.io/bidmachine" }
                    maven { url "https://cboost.jfrog.io/artifactory/chartboost-ads/" }
                    maven { url "https://imobile-maio.github.io/maven" }
                    maven { url "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea" }
                    maven { url "https://maven.ogury.co" }
                    maven { url "https://artifact.bytedance.com/repository/pangle" }
                    maven { url "https://repo.pubmatic.com/artifactory/public-repos" }
                    maven { url "https://s3.amazonaws.com/smaato-sdk-releases/" }
                    maven { url "https://verve.jfrog.io/artifactory/verve-gradle-release" }
                    maven { url "https://ysonetwork.s3.eu-west-3.amazonaws.com/sdk/android" }
    
                }
            }
        </insert>
    </buildGradleAdditions>

    Developers and publishers who use Google AdSense, AdManager, or AdMob must use a consent management platform (CMP) that Google certifies. The CMP must integrate with IAB’s Transparency and Consent Framework when you serve ads to users in the European Economic Area (EEA) or the UK. See Privacy: “TCF v2 consent” for more information.

    Add your Google bidding and Google AdMob / Google Ad Manager app ID

    In the AppLovin MAX Unreal plugin’s AppLovinMAX_UPL_Android.xml, add your Google bidding and Google AdMob App ID under the androidManifestUpdates tag. In the example below, replace «your-admob-app-id» with your Google bidding and Google AdMob App ID.

    <androidManifestUpdates>
    ⋮
        <addElements tag="application">
            <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="«your-admob-app-id»" />
        </addElements>
    ⋮
    </androidManifestUpdates>

    compileSdkVersion

    Google Mobile Ads SDK versions 23.1.0 and newer require a compileSdkVersion of at least 34.

    Set the compileSdkVersion to android-34 or higher in Project Settings > Android SDK > SDK API Level.

    Refer to the Google Mobile Ads SDK Release Notes for the latest compileSdkVersion requirements.

    Gradle errors

    Google AdMob requires Android Gradle plugin version 4.2.0 or higher and Gradle version 6.7.1 or higher. If you see the following error, update your Android Gradle plugin and Gradle versions:

    AAPT: error: unexpected element <property> found in <manifest><application>.
    

    Android manifest merging errors

    Some network SDKs include the <queries> element in their bundled Android Manifest files. If you use an incompatible version of the Android Gradle plugin, this causes one of the following build errors:

    com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
    error: unexpected element <queries> found in <manifest>.
    

    To fix this error, upgrade to one of the following versions of the Android Gradle plugin. These versions support the <queries> element:

    Upgrade the Android Gradle Plugin, not the Gradle Build Tools.

    Current Android Gradle plugin versionVersion that supports <queries> element
    4.1.*All
    4.0.*4.0.1+
    3.6.*3.6.4+
    3.5.*3.5.4+
    3.4.*3.4.3+
    3.3.*3.3.3+

    To upgrade the Android Gradle plugin, follow these instructions:

    1. Navigate to the directory for your version of the Unreal Engine. For example, the default installation path for Unreal Engine 5.2 on macOS is /Users/Shared/Epic Games/UE_5.2/.
    2. In Engine/Source/Programs/UnrealBuildTool/Platform/Android/UEDeployAndroid.cs, update the value for ANDROID_TOOLS_BUILD_GRADLE_VERSION (replace «X.X.X» with the appropriate version number):
      private const string ANDROID_TOOLS_BUILD_GRADLE_VERSION = "com.android.tools.build:gradle:«X.X.X»";
    3. In Engine/Build/Android/Java/gradle/build.gradle update the following line (replace «X.X.X» with the appropriate version number):
      classpath project.hasProperty('ANDROID_TOOLS_BUILD_GRADLE_VERSION') ? project.property('ANDROID_TOOLS_BUILD_GRADLE_VERSION') : 'com.android.tools.build:gradle:«X.X.X»'
      

    Meta Audience Network data processing options

    If you do not want to enable Limited Data Use (LDU) mode, pass SetDataProcessingOptions() an empty string array:

    ⋮
    <gameActivityImportAdditions>
      ⋮
      import com.facebook.ads.AdSettings;
    </gameActivityImportAdditions>
    
    <gameActivityOnCreateAdditions>
      <insert>
        AdSettings.setDataProcessingOptions( new String[] {} );
      </insert>
    </gameActivityOnCreateAdditions>

    To enable LDU for users and specify user geography, call SetDataProcessingOptions() in a form like this:

    <gameActivityOnCreateAdditions>
      <insert>
        AdSettings.setDataProcessingOptions( new String[] {"LDU"}, «country», «state» );
      </insert>
    </gameActivityOnCreateAdditions>

    Meta Audience Network data processing options for users in California

    To learn how to implement Meta Audience Network’s “Limited Data Use” flag in California, read the Meta for Developers documentation.

    Obfuscation

    If you use code obfuscation or resource shrinking, follow Pangle’s Obfuscation guidelines.

    Adapter network information

    Loading…

    iOS

    Unreal Engine requires that you manually integrate third-party frameworks for iOS. It does not support dependency managers like CocoaPods. The MAX Unreal GitHub repository includes a Python script — install_pods.py — to assist with automatically installing dependencies from a Podfile. This script downloads AppLovin adapters and third-party dependencies, and configures your project with build settings to link them.

    This script may not be able to automatically configure third-party SDKs for certain networks. If so, you must integrate them manually.

    Requirements

    • Python 3.6+
    • CocoaPods

    Ensure that you’re using the latest version of CocoaPods. You can check your version by issuing the following command:

    pod --version
    

    To update CocoaPods, run one of the following commands:

    brew upgrade cocoapods
    

    Instructions

    1. Download install_pods.py from AppLovin’s MAX Unreal GitHub repository.
    2. Copy this script into the Source/ThirdParty/IOS/ directory of the AppLovin MAX Unreal plugin.
    3. Create a Podfile in that directory for the adapters you want to integrate.
    4. Run install_pods.py to download the adapters and dependencies. Follow the instructions from the script to complete installation.
    5. Follow the instructions in Preparing mediated networks (iOS). Add any necessary changes to Info.plist in AppLovinMAX_UPL_IOS.xml.


Was this article helpful?
Was this article helpful?
search