Integrating Banner & Interstitial Third-Party Ad Networks - Android


The MoPub SDK can mediate most ad networks through our server-to-server integrations, pre-built adapters, and custom events capabilities. A full list of supported networks can be found here.

We offer pre-built adapters (Client-Side SDK Mediation) for many networks. To set these integrations up, follow the instructions below.


Integration Guide for Android

1. Add the custom event files to your project
– Integrating using the SDK AAR
Integrating using the AAR, the folder for ‘mobileads’ will not exist in your project files. Add the folder ‘mobileads’ into `com.mopub` under your app’s `src/` directory and copy the adapters from [extras/com/mopub/mobileads] that you want to include into the folder.

– Integrating using the SDK Source
The [extras/com/mopub/mobileads] folder contains a set of custom events; simply copy the ones you want into `com.mopub.mobileads` into your app’s `src/` directory.

Currently, our SDK supports the following third-party ad types:

  • AdColony
    • Interstitial ads ( AdColonyInterstitial.java )
  • Google AdMob (through Play Services)
    • Banner ads ( GooglePlayServicesBanner.java )
    • Interstitial ads ( GooglePlayServicesInterstitial.java )
  • Chartboost
    • Interstitial ads ( ChartboostInterstitial.java )
  • Facebook Audience Network
    • Banner ads ( FacebookBanner.java )
    • Interstitial ads ( FacebookInterstitial.java )
  • Conversant
    • Banner ads ( GreystripeBanner.java )
    • Interstitial ads ( GreystripeInterstitial.java )
  • Millennial Media
    • Banner ads ( MillennialBanner.java )
    • Interstitial ads ( MillennialInterstitial.java )
  • Vungle
    • Interstitial ads ( VungleInterstitial.java )

2. Link the third party SDKs
Incorporate the third party SDKs into your project. This typically involves copying a .jar file to your `libs/` directory and adding an entry to your build path. Specific instructions can be found by visiting the ad networks’ developer pages.

3. Display banner ads and interstitials as usual
No changes are required to any of the other code! Be sure to visit the MoPub dashboard to set up the corresponding network campaigns and target the proper ad units.

Note that AdColony, Conversant, Facebook Audience Network, and Vungle should be set up as a custom native networks.

Updated: March 2017