Manual Integration
(Not recommended)
Step 1: Get SDK files
Download the ZIP file containing the included AAR files listed below:
- Appnext
AppnextAndroidSDKCore.aar
- SDK coreAppnextAndroidSDKAds.aar
- Interstitial and fullscreen/rewarded ad unitsAppnextAndroidSDKBanners.aar
- Banners ad unitAppnextAndroidSDKNativeAds.aar
- Native ads ad unit
- Admob
AppnextAndroidAdmobAdapterAds.aar
- Interstitial ad unit via Admob adapterAppnextAndroidAdmobAdapterBanners.aar
- Banners ad unit via Admob adapter
- MAX
AppnextAndroidMaxAdapterAds.aar
- Interstitial, Banners and Fullscreen ad unit via MAX adapter
Step 2: Add 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)
Step 3: Add the relevant AAR files to your project
- Add the 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)
dependencies {
implementation name:'AppnextAndroidSDKAds.aar', ext:'aar'
implementation name:'AppnextAndroidSDKBanners.aar', ext:'aar'
implementation name:'AppnextAndroidSDKNativeAds.aar', ext:'aar'
implementation name:'AppnextAndroidSDKActions.aar', ext:'aar'
implementation name:'AppnextAndroidAdmobAdapterAds.aar', ext:'aar'
implementation name:'AppnextAndroidAdmobAdapterBanners.aar', ext:'aar'
implementation name:'AppnextAndroidMaxAdapterAds.aar', ext:'aar'
implementation name:'AppnextAndroidSDKCore.aar', ext:'aar' // Mandatory
}
example
adding the Interstitial and fullscreen/rewarded
will be implemented in the following way:
dependencies {
implementation name:'AppnextAndroidSDKAds.aar', ext:'aar' // Interstitial and fullscreen/rewarded
implementation name:'AppnextAndroidSDKCore.aar', ext:'aar' // Mandatory
}
Step 4: Google Play Services
Add the following mandatory dependency to the dependencies section:
dependencies {
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1' // Mandatory
}
Step 5: Work Manager
Add the following mandatory dependency to the dependencies section:
dependencies {
implementation 'androidx.annotation:annotation:1.3.0' // Mandatory
implementation "androidx.work:work-runtime:2.7.1" // Mandatory
}
Step 6: Glide Implementation
Add the following mandatory dependency to the dependencies section:
dependencies {
implementation 'com.github.bumptech.glide:glide:4.12.0' // Mandatory
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0' // Mandatory
}
Step 7: App Permissions and Services
Add the following app permissions to your Android manifest file:
{
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
}
Step 8: Update the ProGuard Configuration
-keep class com.appnext.** { *; }
-dontwarn com.appnext.**
Done !
Now when you integrated AppNext SDK with your app,
Go ahead and implement an ad unit !
Updated 5 months ago