Add the Audience Network SDK to your Android App

This guide explains how to include the Audience Network SDK in your Android app so that you can call Audience Network APIs. The preferred method is to use Maven to manage the dependencies; however, download locations for manual integration are also provided.

For information about meeting the new requirements for Android 9 and later, see Caching on Android 9.

Maven (Preferred Download Method)

In Android Studio, make sure that mavenCentral() or jcenter() is included in your project's list of repositories. Repositories are defined in your project's module-level build.gradle file.

repositories {
    mavenCentral()
    jcenter()
}

Next, add the following implementation dependencies to your project's list of dependencies. Dependencies are also defined in your project's module-level build.gradle file. Note that annotation support is required by the Audience Network SDK.

dependencies { 
    implementation 'androidx.annotation:annotation:1.0.0'
    implementation 'com.facebook.android:audience-network-sdk:6.+'
}

Manual Download

If using Maven is not an option, you can download the Audience Network SDK from one of the locations in the following table.