Dash Stats Docs

Integration with MoPub

The banners and interstitial of the AppBrain SDK can easily be integrated in the MoPub mediation solution. You can get more information about MoPub and how to set it up at http://www.mopub.com/platform/ad-network-mediation.

Setting up your app for mediation

We assume you already have a mediated MoPub ad slot defined in your app. To make use of AppBrain’s banners in your mediated ad slot, first follow the general installation instructions on the SDK setup page.

Then add the AppBrain MoPub library to your project. If you use Gradle to build your project, and you have already added the AppBrain repository as described in SDK setup, you can simply add the dependency:

dependencies {
    compile 'com.appbrain:appbrain-sdk:[email protected]'
    compile 'com.appbrain:appbrain-sdk-mopub:+'

If you don’t use Gradle, you can add the appbrain-mopub.jar file to your project’s libs/ folder manually. This file can be downloaded from the AppBrain SDK GitHub page.

Setting up mediation placement

To set up your mediation placement for showing AppBrain banners, go to http://www.mopub.com and click “Networks” at the top of the screen. In the dropdown “Add a network” menu, choose “Custom Native Network”.


Then, in the “Custom Native” setup page click “Set App Class” in the Global Settings row.


Mediating the AppBrain banners

In the dialog that pops up, fill out the following information:

  • Class name: com.appbrain.mediation.MoPubBanner

Then click “Done” and enable the new network for the apps and ad slots you want by checking the box under ENABLED.


Mediating the AppBrain interstitial

For the interstitial, follow the same steps, but fill out the following classname:

  • Class name: com.appbrain.mediation.MoPubInterstitial