MoPub Mediation Adapter

Adcash MoPub Mediation Adapter is designed to integrate Adcash SDK with MoPub Mediation to maximize your App fill rate and revenue.

It’s a simple 2-step integration process.

Integration Guide

Assuming integration is already done with MoPub SDK, if not please follow MoPub Integration guideline.

1. Integrate Adcash SDK

Prerequisite:

1. Add Dependencies

JCenter repository

androidsdk-mopub-adapter-gradle-script

Add JCenter repository if you havn’t added it yet. Adcash SDK also requires Google Play Services and Android Support Library v4
In your project base `build.gradle` file add:

repositories {
    jcenter()
}

dependencies {
    // Integrate Adcash SDK:
    compile 'com.adcash:adcash-mopub-adapter:2.2.2'

    // Required by Adcash SDK:
    compile 'com.android.support:support-v4:24.2.0'
    compile 'com.google.android.gms:play-services:9.4.0'
}

Local library file

If you prefer to use local file instead of Jcenter repository, you can also do it.

androidsdk-mopub-adapter-gradle-script-localFirst, download the MoPub adapter. Then create a `libs` folder (if you do not already have one) in your project (Example: … MyApplication/app/libs/) then add the previously downloaded .AAR file
Open the build.gradle of your app and add the following code lines:
repositories {
    flatDir {
       dirs 'libs'
    }
}

dependencies {
    // Integrate Adcash SDK:
    compile(name: 'adcash-mopub-adapter', ext: 'aar')

    // Required by Adcash SDK:
    compile 'com.android.support:support-v4:24.2.0'
    compile 'com.google.android.gms:play-services-ads:9.2.0'
}

Click Sync Now or request Gradle sync yourself if you have not been promoted automatically. Wait till Gradle finishes.

(Optional) Proguard settings

If you want to enable Proguard in your project, add following line to your `proguard.cfg` file:

> -keep class com.adcash.mobileads.** { *; }

2. Update Manifest

androidsdk-mopub-adapter-manifest-file

At this point you have added all necessary dependencies to your project and need small modifications to your module `AndroidManifest.xml` file to finish with the integration.

  1. Add the following <uses-permission> tags:
    • INTERNET – required to allow the Adcash SDK to make ad requests.
    • ACCESS_NETWORK_STATE – used to check the Network connection availability.
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  1. Add AdcashActivity for full screen ads to work (interstitial and rewarded video)
    <activity
        android:name="com.adcash.mobileads.ui.AdcashActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
        android:hardwareAccelerated="true"
        android:theme="@android:style/Theme.Translucent" />

2. Configure MoPub Custom Event on Mediation Portal

2.1. Add a Network

ScreenShot2

On MoPub Dashboard, click on Networks tab then click on Add a Network button.

ScreenShot3

On the Add a Network page select Custom Native Network under Additional Networks section.

2.2. Configure Custom Native Ad Network

ScreenShot4

Give it a title Adcash, then scroll down for ad units (Adcash MoPub Android Adapter currently supports Banner and Interstitial ad format)