Mintegral Integration Guide

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

Before You Start
Make sure you have correctly integrated ironSource’s Rewarded Video or Interstitial into your application.

Step 1. Create a Mintegral Account

  1. Create an account with Mintegral. You can do so here.
  2. Once your account has been verified, you can login at their partner login here.

Step 2. Create an Application in Mintegral

Already set up your application(s) at Mintegral? Skip to here.

First Time Setup Process
If this is your first time setting up a Mintegral account, continue below.

  1. Login
    1. When you log in for the first time, select ‘APP Setting
      01-mintegral-dashboard
  2. Add Your App
    1. Upon clicking ‘+ Add APP’, a setup module will appear, you can enter details here:
      03-mintegral-add-app
      Note: You will need a unique Mintegral application per platform (iOS + Android) just like you do with your ironSource account.
    2. After you defined the settings, you will be asked to check the ad types you DO NOT wish to be delivered to your application.
      04-mintegral-app-blacklist
  3. Add Ad Units
    1. After you defined the Applications settings, select the relevant Apps through dashboard and click ‘Add AD Unit‘:
      07-mintegral-add-ad-unit-dashboard
    2. Mintegral adapters can serve both Rewarded Video & Interstitial.
      If interested in serving Mintegral Interstitial Ads on the ironSource Mediation platform, select ‘Interstitial Video‘ and select ‘Next‘:
      08-mintegral-add-ad-unit-interstitialFor Rewarded Video, please follow the same steps, only select Rewarded Video‘ in step b. this time.

Step 3. Activate Mintegral in Your ironSource Network Setup Module

Serving Mintegral’s ads through the ironSource mediation platform has never been this easy. Sign in to your Mintegral account when setting up Mintegral on the ironSource SDK Networks setup page.
09-mintegral-platform-setup-module

There are values from your Mintegral account which need to be inserted into your ironSource network setup module in order for Mintegral to work correctly in connection with ironSource:

App Key
The unique ID assigned to your app on Mintegral’s dashboard.
SKey
API key for reporting
Secret
The unique ID assigned to your Mintegral user.

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

If you don’t find the SKey or Secret values feel free to contact developer@mintegral.com or your account manager on Mintegral.

App Key

Once you have created an application in the Mintegral dashboard (as described in step 2), go to the ‘APP Setting’ screen – on top of this page, you will find your App Key:
10-mintegral-app-key

SKey

Once you have logged into your Mintegral user (as described in step 1), go to the ‘Company Info’ under ‘Account’ tab – on the left menu:
11-mintegral-company-infoNow, on the bottom of the page you can find your SKey, as well as your Secret:
11-mintegral-skey-and-secret

Secret (same as SKey)

Once you have logged into your Mintegral user (as described in step 1), go to the ‘Company Info’ under ‘Account’ tab – on the left menu:
11-mintegral-company-infoNow, on the bottom of the page you can find your Secret, as well as your SKey:
11-mintegral-skey-and-secret

Step 4. Add the Mintegral Adapter to Your Build

Mintegral solution supports manual download integration.

To integrate the Mintegral Adapter through Manual Download:

  1. Download the Mintegral Adapter:
    Add the Mintegral Adapter to your build. You can find the latest Mintegral Adapter here.
  2. Download the Mintegral .AAR files
    1. Unzip “Mintegral AARs” and the following for each file:
      1. If using Eclipse: Import the .AAR file as a library project.
      2. If using Android Studio, download the .AAR file and add as a dependency to your own module. Go to File  New  New Module  Import .AAR and navigate to the location where the .AAR file has been downloaded.
        android-studio-aar-integration
  3. Add the Mintegral Adapter to your Project:
    After you download the Adapter; drop the Mintegral Adapter jar into the libs folder in your Android Project.
    Supersonic Mediation Drop Libs
  4. Make sure you add the following to your Gradle build file under the dependencies section:
    implementation files('libs/mintegraladapter:4.1.0@jar')
    implementation project (':mintegral_common-9.12.5')
    implementation project (':mintegral_interstitialvideo-9.12.5')
    implementation project (':mintegral_mtgdownloads-9.12.5')
    implementation project (':mintegral_mtgjscommon-9.12.5')
    implementation project (':mintegral_playercommon-9.12.5')
    implementation project (':mintegral_reward-9.12.5')
    implementation project (':mintegral_videocommon-9.12.5')
    implementation project (':mintegral_videojs-9.12.5')

  5. Add to your project’s xml directory the file “mtg_provider_paths.xml”, and write inside it the following:
    <?xml version="1.0" encoding="utf-8"?>
    <paths xmlns:android="http://schemas.android.com/apk/res/android">
    <external-path name="external_files" path="."/>
    </paths>
    

For Proguard Users Only

If you are using ProGuard with the Mintegral adapter, you must add the following code to your ProGuard file:

    -keepattributes Signature   
    -keepattributes *Annotation*   
    -keep class com.mintegral.** {*; }  
    -keep interface com.mintegral.** {*; }  
    -keep class android.support.v4.** { *; }  
    -dontwarn com.mintegral.**   
    -keep class **.R$* { public static final int mintegral*; }
    -keep class com.alphab.** {*; }
    -keep interface com.alphab.** {*; }

Step 5. Update AndroidManifest.xml

Manifest Permissions:

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>
    <!-- Required for the Mintegral SDK in China -->
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>

Manifest Activities:

Add the following requirement inside the <application> tag on your manifest:

<uses-library android:name="org.apache.http.legacy" android:required="false"/>


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

    <activity
        android:name="com.mintegral.msdk.activity.MTGCommonActivity"
        android:configChanges="keyboard|orientation"
        android:screenOrientation="portrait"
        android:exported="true"
        android:theme="@android:style/Theme.Translucent.NoTitleBar">
    </activity>
    <activity   
   android:name="com.mintegral.msdk.reward.player.MTGRewardVideoActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
    </activity>
    <service android:name="com.mintegral.msdk.shell.MTGService" >
        <intent-filter>
            <action android:name="com.mintegral.msdk.download.action" />
        </intent-filter>
    </service>
    <provider
            android:name="com.mintegral.msdk.base.utils.MTGFileProvider"
            android:authorities="${applicationId}.mtgFileProvider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/mtg_provider_paths"/>
        </provider>

Done!
You are now all set to deliver Mintegral ads within your application!