MoPub Mediation Integration Guide

This guide will instruct you step-by-step on how to set MoPub live as an Ad Network on the ironSource Mediation platform.

Before You Start 

Make sure you have correctly integrated ironSource’s Rewarded Video into your application. 

Step 1. Create a MoPub Account

First Time Setup

Go to the Mopub platform to create an account and sign up for MoPub Marketplace.  To be approved to the MoPub Marketplace, send an email to with the subject line “Ironsource – MoPub Marketplace Approval”and cc  Make sure to include the following details in your email:

  1. Up-to-date payment information
  2. Screenshots of the app in your Admin page to show that you are the owner of the account
  3. Your app’s Android package name

Registered Users

  1. Sign into your Mopub Account
  2. Navigate to the Apps tab



Step 2. Add Your Application

You must add the app you’d like to run Rewarded Video on to your MoPub account. If you’re a returning user and the app has already been added to your account, you may skip to Step 3.

If it’s your first time adding an application, simply click on ‘Get Started‘.
As a returning user, under Apps, on the top right corner, select ‘Add New App‘ :

App Details

  • Platform: Android
  • App Name: Fill in your app’s name
  • Package Name: Enter the Android package name. If your app is not live in the Google Play Store yet, you can enter a placeholder package name for testing purposes.
  • Category: Select the most relevant category for your app
  • Define the Ad Unit

    • Device: Phone
    • Format: Rewarded Video
    • Name: Fill in a name for this ad unit placement
      ironsource-mopub-ad-unitYou can skip the Ad Unit settings on the right-hand side as Frequency Caps and Rewards will be set on the ironSource platform.
    • Select ‘Save and View Code Integration
    • You will then be directed to the below window with your Ad Unit ID. Reserve this data for future use on the ironSource platform and ignore the code integration instructions by clicking ‘All Done!‘.

    Step 3. Activate MoPub on the ironSource SDK Network Module

    API Key This is a unique identifier for your MoPub account.
    Inventory Report ID This is the unique identifier for the ad unit inventory served through MoPub which allows the ironSource Mediation Platform to import performance data from your MoPub account to use in reporting & optimization.
    Ad Unit ID The unique identifier for your ad unit in MoPub’s system.

    Once you obtain this information, you must configure MoPub’s Parameters in your ironSource Account. By adding the above information correctly, you will be able to take full advantage of MoPub ad inventory and reporting data on the ironSource Mediation platform.

    1. API Key & Inventory Report ID
      Navigate to the Reports tab. Check the box to ‘Enable data access through API‘ and click ‘View API Access Details‘.
      ironsource-mopub-reports-dashboardThe following window will open where you can find your API Key and Inventory Report ID:
    2. Ad Unit ID

      1. You can find your Ad Unit ID by navigating to the Apps tab and clicking on the relevant app.
      2. You will then see an Ad Unit Summary table with your configured Ad Units. Click on the relevant ad unit to open the Ad Unit Details:ironsource-mopub-ad-unit-summary
      3. Then, click on the Code Integration button to view your Ad Unit ID:ironsource-mopub-app-details


    Configure MoPub’s Parameters into ironSource Account

    • Once you have all of these parameters, log in to your ironSource account and go to ‘Monetize‘ ➣ ‘Mediation‘ ➣ ‘SDK Networks‘. Select MoPub from the list of Available Ad Networks:
    • Then enter your MoPub API Key and Inventory Report ID. You can also choose to activate MoPub ad inventory for all countries or specify to activate it in select countries. Then click ‘Save‘:
    • MoPub will be enabled in the Available Ad Networks list and you can define the app settings in the setup module below by clicking on the ‘Define‘ icon:
    • Enter the Ad Unit ID, set the Status to Active and click ‘Save‘:
    • You will then see MoPub as Active for Rewarded Video:
    • Verify your integration with the Reporting API; this column will check your integration through the Reporting API and return three possible responses: Verified, Failed and No Response. Double check your integration and the information you entered above; then click ‘Retry‘ until you see ‘Verified’.

    Step 4. Add the MoPub Adapter to Your Build

    ironSource supports both Gradle dependencies and manual download mechanisms.

    MoPub recommends running with Google Play Services version 10.2.0 in conjunction with their SDK.


    1. Make sure the following Maven URL exist in your build.gradle script of your app module (should appear only once for all the adapters).
      repositories {
      jcenter() // includes the MoPub SDK and AVID library
      maven { url ""}
      maven { url "" }
    2. Add the adapter’s Maven name to your build.gradle script of your app module:
      dependencies {
      implementation 'com.ironsource.adapters:adcolonyadapter:4.1.8@jar'
      implementation 'com.adcolony:sdk:3.3.8'
    3. Add the android-support-v4.jar, android-support-annotations.jar and android-support-v7-recyclerview.jar and the following to your Gradle build file:
      implementation 'com.mopub.volley:mopub-volley:2.0.0'

    Manual Download

    1. Download the MoPub Adapter:
      Add the MoPub Adapter to your build. You can find the latest MoPub Adapter here.
      Important! The MoPub Adapter also contains the MoPub jar. You DON’T need to additionally add the MoPub jar directly.
    2. Add the MoPub Adapter to your Project:
      After you download the Adapter; drop the MoPub Adapter jar into the libs folder in your Android Project.
      AdColony integration with Supersonic Mediation - 10
    3. Make sure you add the following to your Gradle build file under the dependencies section:
      implementation files('libs/adcolonyadapter:4.1.8@jar')

    4. Download the MoPub .AAR file
      In Android Studio, download the MoPub .AAR file and add as a dependency to your own module. Go to FileNewNew ModuleImport .AAR and navigate to the location where the MoPub .AAR file has been downloaded.
    5. Download additional jars
      Add the mopub-volley-2.0.0.jar to your project under App/Libs.
      MoPub requires support-v4-[version].jar, android-support-annotations.jar and android-support-v7-recyclerview.jar to be included in your application. If it’s not already included, please make sure to add it as well.

    Step 5. Update AndroidManifest.xml

    Manifest Activities
    Add the following activities inside the <application> tag on your manifest:

    <activity android:name="com.mopub.mobileads.MoPubActivity" android:configChanges="keyboardHidden|orientation|screenSize"/> 
    <activity android:name="com.mopub.mobileads.MraidActivity" android:configChanges="keyboardHidden|orientation|screenSize"/> 
    <activity android:name="com.mopub.common.MoPubBrowser" android:configChanges="keyboardHidden|orientation|screenSize"/> 
    <activity android:name="com.mopub.mobileads.MraidVideoPlayerActivity" android:configChanges="keyboardHidden|orientation|screenSize"/> 
    <activity android:name="com.mopub.mobileads.RewardedMraidActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>
    <activity android:name="com.mopub.common.privacy.ConsentDialogActivity" android:configChanges="keyboardHidden|orientation|screenSize"/>

    For ProGuard Users Only 

    If you are using ProGuard with the MoPub adapter, you must add the following code to your ProGuard configuration (Android Studio: or Eclipse: proguard-project.txt):

    # MoPub Proguard Config
    # NOTE: You should also include the Android Proguard config found with the build tools:
    # $ANDROID_HOME/tools/proguard/proguard-android.txt
    # Keep public classes and methods.
    -keepclassmembers class com.mopub.** { public *; }
    -keep public class com.mopub.**
    -keep public class android.webkit.JavascriptInterface {}
    # Explicitly keep any custom event classes in any package.
    -keep class * extends com.mopub.mobileads.CustomEventBanner {}
    -keep class * extends com.mopub.mobileads.CustomEventInterstitial {}
    -keep class * extends com.mopub.mobileads.CustomEventRewardedAd {}
    -keep class * extends com.mopub.nativeads.CustomEventNative {}
    # Keep methods that are accessed via reflection
    -keepclassmembers class ** { @com.mopub.common.util.ReflectionTarget *; }
    # Support for Android Advertiser ID.
    -keep class {*;}
    -keep class {*;}
    -keep class$Info {*;}
    # Support for Google Play Services
    -keep class * extends java.util.ListResourceBundle {
        protected Object[][] getContents();
    -keep public class {
        public static final *** NULL;
    -keepnames class *
    -keepclassmembernames class * { *;
    -keepnames class * implements android.os.Parcelable {
        public static final ** CREATOR;

    You are now all set to deliver MoPub Ads within your application!

    What’s Next?

    To add additional mediation Ad networks, integrate the ironSource adapters and follow our integration guides.