Adapter for AdMob Mobile Ads SDK for Android

Follow this guide to add Media.Net Android SDK to AdMob mediation layer. The Media.Net adapter allows the inclusion of Media.Net ads in AdMob mediation.

Go through the steps in our Getting Started Guide to add Media.Net SDK into your project before starting the integration.

Overview of AdMob Adapter Mediation

In this configuration, your application talks to the AdMob SDK, which in turn requests content from the Media.Net SDK. See below diagram of the flow of information from Media.Net - AdMob adapter mediation:

Media.Net SDK Instructions


  • Media.Net SDK
  • AdMob SDK (The minimum version tested is 9.6.1)

Before Getting Started:

  • Make sure that your app has the AdMob SDK and is registered in your AdMob account.
  • Your app has configured the Banner and/or interstitial Ad Units.
  • You have read through AdMob getting started guide for Android.
  • You have the Media.Net dashboard account and ‘Customer ID’ for the app where you want to run ads.

Integrating Media.Net Adapter into your Android App

Update the app level build.gradle as follows:

   dependencies {
	 compile ''

Media.Net Network Setup in AdMob

Follow the instructions below to add MNet as an Ad Network through AdMob dashboard:

1) Click on MONETIZE from the menu bar on top of the page. Then select your app from the list on the left side.

2) After selecting your app from the left menu, click on ad source from the table on the right, for the ad unit you want to add MNet as the ad network.

3) Next click on + NEW AD NETWORK in the next screen to ad MNet as another source of ad serving for the ad unit.

4) In the next screen click on the + CUSTOM EVENT from the left menu. The custom event will require filling in Class Name, Label and parameters. Your Media.Net accounts manager will provide you with these details.

Passing custom data through AdMob Mediation Adapter

Custom data like user-details, location-details and context-link can be sent into the AdRequest object, through certain parameters, which will be picked up by the MNet ad-views to contextualize the mediation-ads.

NOTE: this process is equivalent in both Banner and Interstitial ads.

Here is an example for setting the user and location details in the AdRequest object

    final AdRequest adRequest = new AdRequest.Builder()