This page will show you how to integrate the Leadbolt SDK to show Rewarded Video and Fullscreen ads in your Android app with the MoPub Custom Adapter. Download the Leadbolt SDK, MoPub Adapter and sample app. Make sure you can compile the sample app and see test ads.

To get started sign up for a Leadbolt Publisher account here or login to the Publisher Portal here.

gstart


Before you begin Before you begin

  • Have you signed up and logged in to the Leadbolt Publisher Portal?
  • Did you add an App in the portal?
  • Ensure, you have downloaded the Leadbolt SDK and sample app from the link above
  • To get Direct Deal Ads in your App, click on “Direct Deals” link in the Publisher Portal and click on the Apply button.
  • To run Rewarded Video in your App, you will need to apply and be approved. Click on “Rewarded Videos” link in the Publisher Portal to apply or contact your account manager.
  • Have you signed up and logged in to the MoPub Portal?
  • Have you added your App in the MoPub portal?

Setup Setup your Project with MoPub and Leadbolt SDK

  • Setup your Android Project with MoPub SDK as outlined here.
  • Add the required permission android.permission.INTERNET in your AndroidManifest.xml file
  • Add the required permission android.permission.ACCESS_NETWORK_STATE in your AndroidManifest.xml file
  • To ensure your App is compatible with Android 6.0 and above devices, set the project’s Build and Compile SDK Version to API Level 23 or above in your build.gradle file
    compileSdkVersion = 25
    buildToolsVersion = '25.0.3'

  • Also set the Target SDK Version in your App’s AndroidManifest.xml file to 25 or higher to target Android 6.0 features
    android:targetSDKVersion="25"

  • Copy the downloaded AppTracker.jar and MoPubTracker.jar file to your Android Project’s “libs” folder. If folder doesn’t exist, create one and add the jar file to it
  • Add the required Leadbolt Activity in your AndroidManifest.xml


Setup Setup Fullscreen Ad in MoPub Portal

  • Add an Fullscreen Ad type to your App in the MoPub Portal
  • Click on “Networks” and add a “New Ad Network”. From the list of Ad Networks, choose “Custom Native Network”.
  • Enter the following details against the Fullscreen Ad type
    Item Value
    Custom Event Method leave blank
    Custom Event Class com.mopub.mobileads.AppTrackerInterstitial
    Custom Event Class Data {"api_key":"YOUR_APP_API_KEY"}
  • Enter your App’s API Key (found in the Leadbolt Portal) and use “inapp” as the location code.
  • Once you have added the Custom Native Network in the MoPub portal, you will need to enable it to run. To enable, click on “Segments” on the top menu. The click on Global Segment. Next to the “Fullscreen” and “Rewarded Video”, enable the Custom Native Network and set the eCPM to value higher than other Ad Networks. E.g $10.00
  •  

     

Setup Setup Rewarded Video in MoPub Portal

  • Add an Rewarded Video Ad type to your App in the MoPub Portal
  • Click on “Networks” and add a “New Ad Network”. From the list of Ad Networks, choose “Custom Native Network”.
  • Enter the following details against the Rewarded Video type
    Item Value
    Custom Event Method leave blank
    Custom Event Class com.mopub.mobileads.AppTrackerRewardedVideo
    Custom Event Class Data {"api_key":"YOUR_APP_API_KEY"}
  • Enter your App’s API Key (found in the Leadbolt Portal)
  • Once you have added the Custom Native Network in the MoPub portal, you will need to enable it to run. To enable, click on “Segments” on the top menu. The click on Global Segment. Next to the “Fullscreen” and “Rewarded Video”, enable the Custom Native Network and set the eCPM to value higher than other Ad Networks. E.g $10.00
  •  

     

Test Integration Test your Integration

  • Run your Project on an Android device.
  • Ensure, Leadbolt test ads are displayed correctly in the App.
  • Once test ads are seen on your device, go to your Leadbolt Portal and set your App to “Live”
  • Once approved, you should see live ads in your App.

Congratulations! You have successfully integrated the Leadbolt SDK with MoPub in your App
 


Troubleshooting Troubleshooting

  • Rewarded Video and Fullscreen Ads may not be available at all times in all countries. It is always best to test with your App in Test Mode in the Publisher Portal to ensure as Test Ads are generally always available.
  • You should check your Publisher Portal and ensure the relevant section is visible under your App. Use the “Add Section” button to add if not available.
  • You should check the SDK logs located in Logcat logs with the Tag “AppTracker”.
  • Always test the sample app provided to confirm any integration issues are SDK based.
  • Please Note: mediation platforms often require optimization settings, can take time to sync mediation setup for your App. Please check the mediation sdk log messages, allow ‘sufficient’ time for sync and if relevant contact MoPub support for help.
  • This plugin has been tested and compatible with MoPub Android SDK version 4.15.0

gstart

← Return to Help Center