Getting Started With Appnext

Welcome to the Appnext developer hub. You'll find comprehensive guides and documentation to help you start working with Appnext as quickly as possible, as well as support if you get stuck. Let's jump right in!

Start Now!

Admob Adapter Installation

Android Admob Adapter Installation

Requirements

  • The Appnext AdMob Adapter supports Android API 23+ when building for Android
  • The Appnext AdMob Adapter requires internet access to pull ads information for your app

Adapter Integration

Latest version: 2.5.4.472 (released on October 7th, 2020)

Using Gradle

Before updating a new SDK version, it is recommended to clear the Gradle cache and recompile the project.

Step 1: Define the root level gradle of the project

You need to paste into the project gradle (Project integration App)

allprojects {
  repositories {
  maven { url "http://dl.appnext.com/" }
 }
}

Step 2: Define in the module build.gradle

You need to paste to the module gradle (Module App)

You're done! Go ahead and choose an ad unit to integrate with the adapter!

dependencies {
  implementation 'com.appnext.sdk.adapters:admob-ads:2.+' // Mandatory for interstitial and fullscreen/rewarded video ad units
  implementation 'com.appnext.sdk.adapters:admob-banners:2.+' // Mandatory for banners ad unit
  implementation 'com.google.android.gms:play-services-ads:18.2.0' // Mandatory
}

Manual Integration (Not Recommended)

Step 1: Download the ZIP file with the SDK and adapter AAR files

Download the AAR files from here
The ZIP file includes the following AAR files;

  • AppnextAndroidSDKCore.aar - The SDK core
  • AppnextAndroidSDKAds.aar - For the interstitial and fullscreen/rewarded ad units
  • AppnextAndroidSDKBanners.aar - For the banners ad unit
  • AppnextAndroidSDKNativeAds.aar - For the native ads ad unit
  • AppnextAndroidSDKActions.aar - For the actions ad unit
  • AppnextAndroidAdmobAdapterAds.aar - The interstitial and fullscreen/rewarded ad units Admob adapter
  • AppnextAndroidAdmobAdapterBanners.aar - The banners ad unit Admob adapter

Step 2: Add the AAR files to Your Project

Extract the ZIP file and add the relevant AAR files to your "libs" folder in your project;

  • You must add the AppnextAndroidSDKCore.aar file (make sure to add it only once)
  • Add other AAR files according to your relevant ad unit integration
  • Add the relevant Mopub adapter AAR file accordingly
  • All AAR files must be from the same version (download the latest ZIP file to be sure)

Ad the following code to the project's build.gradle

allprojects {
   repositories {
      jcenter()
      flatDir {
        dirs 'libs'
      }
   }
}

Step 3: Add the following code to the module's build.gradle

For example, adding the Ads AAR with the adapter AAR file:

dependencies {
  implementation name:'AppnextAndroidSDKCore.aar', ext:'aar' // Mandatory
  implementation name:'AppnextAndroidSDKAds.aar', ext:'aar'
  implementation name:'AppnextAndroidAdmobAdapterAds.aar', ext:'aar'
  implementation 'com.google.android.gms:play-services-ads:18.2.0' // Mandatory
}

Step 4: ProGuard

Exclude Appnext from your proguard by using the line:

-keep class com.appnext.** { *; }
-dontwarn com.appnext.**

You're done! Go ahead and choose an ad unit to integrate with the adapter!

Example Project

You can download an example project (Android Studio) from here.

Updated 22 days ago


What's Next

Integrate one of the adapter's ad units

Banners
Interstitial
Rewarded and Fullscreen Video

Admob Adapter Installation


Android Admob Adapter Installation

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.