AdMob SDK adapter

Last updated on June 6, 2019

If you want to use OpenX as a source of demand on AdMob via the Google Mobile Ads SDK, you can build a custom event adapter to integrate the OpenX Mobile Android SDK with the Google Mobile Ads SDK.

To help you quickly build your adapter, OpenX provides sample adapter code for bannerThis is an ad that appears on a web page which is typically hyperlinked to an advertiser’s website. Banners can be images (GIF, JPEG, PNG), JavaScript programs or multimedia objects (For example, Java)., interstitialA full-screen ad displayed in content transitions. For example, a video ad that loads between levels of a mobile game. display, and opt-in video ads in the AdMob adapter sample app. The sample adapters are built according to AdMob's instructions. Make sure you integrate the ad format into your app according to the Prerequisites indicated by AdMob.

Note: You can also build your own custom event adapter to mediate OpenX video interstitial ads.

  1. Get the following from OpenX:
  2. Make sure you have imported the OpenX Mobile Android SDK into your project and integrated it into your app. See:
  3. Add the Google Mobile Ads SDK to your project according to AdMob's instructions.
  4. Add the OpenX AdMob adapters to your project where needed for your app (in the samples from OpenX, you will see them in com.admob):
    • com.admob.AdmobBannerAdapter

    • com.admob.AdmobInterstitialAdapter

    • (Beta) com.admob.AdmobRewardedVideoAdapter

  5. In the AdMob UI, choose the mediation group to which you will add OpenX. For example, if you want to mediate OpenX rewarded video ads, choose an Android rewarded video mediation group that you have created.
  6. In the AdMob UI, in the mediation group, define a custom event. Use the following settings:
  7. Save the custom event and the mediation group.

  8. Create a separate custom event for each ad format that you decide to use (banner, interstitial display, and rewarded video).
  9. Test your implementation and notify OpenX to enable live traffic.
Fill out my online form.