Skip to content

Mopub Mediation for Android

StartApp edited this page Jul 15, 2014 · 14 revisions

This document describes the procedure for serving StartApp Ads in your application using MoPub mediation network

NOTES:

  • The code samples in this document can be copy/pasted into your source code
  • If you have any questions, contact us via support@startapp.com


##Step 1, Getting Started The following instructions assume you are already familiar with the MoPub mediation network and have already integrated the MoPub Android SDK into your application. Otherwise, please start by visiting MoPub site and reading the instructions on how to add MoPub mediation code into your app.

Back to top


##Step 2, Adding Your Application to Your StartApp Developer's Account

  1. Login into your StartApp developer's account
  2. Add your application and get its App ID
  3. Download the StartApp In-App SDK

For any questions or difficulties during this process, please contact us via support@startapp.com

Back to top


##Step 3, Integrating the MoPub Mediation Adapter Copy the adapter jar file from the zip to the “libs” directory of your project.

Back to top


##Step 4, Integrating StartApp In-App SDK Integrate the StartApp SDK by implementing steps 1-3 from the integration manual. You can ignore all the following steps unless you want to use StartApp Ads directly instead of via MoPub mediation network.

In step 3 of the integration, use the following line to initialize the SDK:

StartAppSDK.init(this, "Your Developer Id", "Your App ID", false);

The extra false parameter will disable StartApp "Return Ads" feature as it's not an integral part of MoPub mediation. You can still enjoy this attractive ad unit directly by omitting the false parameter. In this case Return Ads will be activated and display StartApp direct ads, outside of the MoPub Mediation network.

Back to top


##Step 5, Adding a Custom Event

  1. Login into your MoPub account
  2. Navigate to "Networks" tab and click "Add a Network"
  3. Find your "Ad Unit" and then click "Edit Mediation"
4. Choose "New Ad Network" 5. Click "Custom event", and fill in the following fields: * Class Name: *com.startapp.android.mediation.MoPub.StartAppCustomEvent* * Label: *StartApp* * Parameter: leave empty for automatic mode, or use one of the following options: AdMode.OVERLAY AdMode.FULLPAGE AdMode.OFFERWALL

NOTE: we highly recommend using the automatic mode which selects the best ad to load.

  1. Click "Continue"

Back to top


##Step 6, Testing Your Application Congratulation - that's it! You may now run your app and see StartApp ads in action.

Back to top

Clone this wiki locally