Integrate with MoPub

If you already have MoPub ads serving in your app, but want to integrate AwesomeAds as well, without having to directly use the Android Publisher SDK, you can follow the steps below:

repositories {
    maven { url "" }

Add the MoPub plugin

You can either change your module’s build.gradle file (usually the file under MyApplication/app/) to the following format:

dependencies {
    # add the Android Publisher SDK
    compile 'tv.superawesome.sdk.publisher:superawesome:RELEASE-VERSION-NAME'

    # add MoPub plugin
    compile 'tv.superawesome.sdk.publisher:samopub:RELEASE-VERSION-NAME'

Setup MoPub Custom Networks

Login to the MoPub dashboard using your preferred account.

From here forward the tutorial assumes you have an Android app with three ad units setup in MoPub; one banner, one interstitial ad and one rewarded video ad:


From your MoPub admin interface you should create a New Order


From the next menu, select New line item


Notice that the custom event class names required by MoPub are:

  • for Banner Ads:


  • for Interstitial Ads:


  • for Rewarded Video Ads:


And, you can tell MoPub what AwesomeAds ads to load and how to display them by filling out the custom event class data field with a JSON similar to this:

    "placementId": 30473,
    "isTestEnabled": true or false,
    "isParentalGateEnabled": true or false,
    "orientation": "ANY" or "PORTRAIT" or "LANDSCAPE",
    "shouldShowCloseButton": false or false,
    "shouldAutomaticallyCloseAtEnd": true or false,
    "shouldShowSmallClickButton": true or false
  • In the second tab Ad unit targeting, Select your App&ad unit e.g. Banner

  • In the third tab Audience targetting, Select your target audience

*Create multiple line items for banner, interstitial, and video(rewarded) ads.

Implement Ads

Initialise the MoPub sdk with AwesomeAds adapter configuration

MoPub.initializeSdk(this, SdkConfiguration.Builder("_any_ad_unit_id_")
                .build()) {

Once the previous steps are done, you can add MoPub banners, interstitials and rewarded video ads just as you normally would:

Since the previously created custom events will run on these ads, and the Android Publisher SDK is integrated alongside the MoPub plugin, you should start seeing ads playing.