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!

Getting Started with the Android SDK

Getting started with the Appnext Android SDK

Before you begin

  • The New Native Ads ad unit is supported on Android API 15 and above
  • All other ad units are supported on Android API 14 and above
  • The integration is done by using Gradle preferences. Manual integration (AAR files) is supported, but we highly recommend using the automated Gradle option!

SDK Integration

Using Gradle (Recommended)

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) under "dependencies"

For the Interstitial and Rewarded/Fullscreen video ad unit:

dependencies {
  compile 'com.appnext.sdk:ads:2.+'
  compile 'com.google.android.gms:play-services-basement:11.0.0' // Mandatory
  compile 'com.google.android.gms:play-services-location:11.0.0' // Mandatory
}

Ads size: 417 KB

For the Banners ad unit:

dependencies {
  compile 'com.appnext.sdk:banners:2.+' 
  compile 'com.google.android.gms:play-services-basement:11.0.0' // Mandatory
  compile 'com.google.android.gms:play-services-location:11.0.0' // Mandatory
}

Banners size: 314 KB

For the Native Ads ad unit

dependencies {
  compile 'com.appnext.sdk:native-ads2:2.+' // New Native Ads
  compile 'com.google.android.gms:play-services-basement:11.0.0' // Mandatory
  compile 'com.google.android.gms:play-services-location:11.0.0' // Mandatory
  compile 'com.appnext.sdk:native-ads:2.+' // Old Native Ads (deprecated)
}

New Native Ads size: 303 KB

For the Actions ad unit

dependencies {
  compile 'com.appnext.sdk:actions:+'
  compile 'com.google.android.gms:play-services-basement:11.0.0' // Mandatory
  compile 'com.google.android.gms:play-services-location:11.0.0' // Mandatory
}

Any combination of the ad units should reflect adding the relevant line

dependencies {
  compile 'com.appnext.sdk:ads:2.+'
  compile 'com.appnext.sdk:banners:2.+'
  compile 'com.appnext.sdk:native-ads2:2.+'
  compile 'com.google.android.gms:play-services-basement:11.0.0' // Mandatory
  compile 'com.google.android.gms:play-services-location:11.0.0' // Mandatory
}

Ad units combination sizes:
The base size of all ad units is 233 KB. In addition, the following sizes should be added according to the chosen ad units:
Ads size- 185 KB
Banners size- 81 KB
New Native Ads size- 70 KB

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

Using Mopub and Admob mediations

  • For Mopub installation click here
  • For Admob installation click here

Manual Integration (Not Recommended)

Step 1: Download the ZIP file with the SDK 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

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
  • 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 relevant AAR files to your project

dependencies {
  compile name:'AppnextAndroidSDKCore.aar', ext:'aar' // Mandatory
  compile name:'AppnextAndroidSDKAds.aar', ext:'aar'
  compile name:'AppnextAndroidSDKBanners.aar', ext:'aar'
  compile name:'AppnextAndroidSDKNativeAds.aar', ext:'aar'
  compile name:'AppnextAndroidSDKActions.aar', ext:'aar'
  compile 'com.google.android.gms:play-services-basement:11.0.0' // Mandatory
  compile 'com.google.android.gms:play-services-location:11.0.0' // Mandatory
}

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

dependencies {
  compile name:'AppnextAndroidSDKCore.aar', ext:'aar' // Mandatory
  compile name:'AppnextAndroidSDKAds.aar', ext:'aar'
  compile 'com.google.android.gms:play-services-basement:11.0.0' // Mandatory
  compile 'com.google.android.gms:play-services-location:11.0.0' // Mandatory
}

Step 4: Update the ProGuard Configuration

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

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

App Permissions and Services

Google Play Services
It is required to integrate the latest version of Google Play Services in your app.
In case you do not wish to integrate all Google Play Services APIs, make sure to include the following APIs:

  • Google Actions, Base Client Library - Basement
  • Google Location and Activity Recognition

App Permissions
The Appnext SDK uses the permissions granted to your app in order to improve campaigns targeting, and in order to suggest the most relevant apps to your users.
We highly recommend that your app request the following permissions so we can better suggest apps to your users, and serve premium campaign types in your app:

android.gms.permission.ACTIVITY_RECOGNITION
android.permission.ACCESS_WIFI_STATE
android.permission.READ_PHONE_STATE
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_COARSE_LOCATION
android.permission.GET_TASKS
android.permission.REAL_GET_TASKS
android.permission.PACKAGE_USAGE_STATS
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.CAMERA
android.permission.BLUETOOTH_ADMIN

Additional Requirements - Privacy Policy

At Appnext, we collect user data through our software development kit, APIs and similar technological solutions integrated in third-party mobile applications. This allows the tracking of mobile application use, installations and downloads, in addition to enabling the serving of advertising and personalized content, as described in our privacy policy.

Pursuant to Google Play policies, you must provide a privacy policy for your app, which will inform your users how your app collects, uses and shares user data, including the types of parties with whom the data is shared. Pursuant to Google Play policies, the privacy policy must be linked from within the app, and from the app's listing on Google Play.

We recommend that your privacy policy contain language materially similar to the following:

"We allow third-party companies to serve ads and collect certain anonymous information when you visit our app. These companies may use anonymous information such as your Google Advertising ID, your device type and version, browsing activity, location and other technical data relating to your device, in order to provide advertisements".


Getting Started with the Android SDK

Getting started with the Appnext Android SDK