MoPub SDK adapter

Last updated on June 6, 2019

If you want to use OpenX as a source of demand on MoPub via the MoPub SDK, you can build an adapter to integrate the OpenX Mobile Android SDK with the MoPub 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., video interstitial, and opt-in video ads in the MoPub adapter sample app included in the OpenX Mobile Android SDK. The sample adapters are built according to MoPub's instructions. You will need to customize each adapter to meet your needs as instructed below.

  1. Add the MoPub SDK as a dependency.
  2. [build.gradle (Module: app)]
    dependencies {
    ...
    	compile('com.mopub:mopub-sdk:4.14.0@aar') {
    		transitive = true
    	}
    }
  3. Copy and paste the adapter files from the Mediation Adapters folder in the OpenX Mobile Android SDK zip file into your project. Place the files in this location:

    com.mopub.mobileads

  4. In the MoPub web interface, in an order, create a network line itemThe primary unit of execution for an order, which represents a specific inventory purchase and the required conditions for ad delivery. using the Custom Native Network type. Place the fully-qualified class name of your custom event (for example, com.mopub.mobileads.MopubBannerAdapter) in the Custom Class field.
  5. In the Data field, use the following formats:
  6. Select the app and ad unitThe smallest inventory component that represents the space on a site where ads display. for the line item to target.
  7. If using multiple adapters (MopubBannerAdapter, MopubInterstitialAdapter, and/or MopubRewardedVideoInterstitialAdapter), create a separate line item for each adapter.
  8. Test your implementation and notify OpenX to enable live traffic.

 

Fill out my online form.