2.5.6 Android SDK Integration Guide
1. Get the app key
Add your app to Appodeal and get the app key for your application, as it is used during SDK integration.
2. Link your Admob account to Appodeal
Appodeal yields optimal results in cooperation with Admob. Use our application to link them. The application will allow Appodeal to access your Admob reports over API, and will create new ad units on Admob and submit them to Appodeal. Please, see this page for more information.
If you don't have Admob account, please sign up on admob.com.
General Data Protection Regulation (GDPR) compliance
Publishers need to update their apps to collect the user consent prior to initializing our SDK (Read our guide on collecting consent here).
Publishers need to pass the boolean consent flag(with 'false' meaning that the user declined to give the consent) to the
Appodeal.initialize() method of our SDK.
1. Choose your integration type
You can use our demo app as a reference project.
Android API level 14 (Android OS 4.0), but you can integrate the Appodeal SDK in apps with lower
minSdkVersion. On the devices that don't support Android 4.0+, our SDK will just be disabled.
Mediation A/B testing
If you want to compare Appodeal's performance to another mediation, please follow this Mediation A/B testing guide.
You can integrate Android SDK 2.5.6 with major native ads improvements, segment v2 support, GDPR compliance and Parallel Bidding support.
There are two ways to integrate the SDK:
Apps can import the Appodeal SDK with a Gradle dependency that points to the Maven repository. In order to use that repository, you need to reference it in the app's project-level build.gradle file. Open yours and look for an allprojects section:1. Add the Appodeal maven repository
Example project-level build.gradle:
2. Add maven dependencies
Next, open the app-level build.gradle file for your app, and look for the dependencies section.
Add one of the lines in bold below, which instruct Gradle to pull in the latest version of the Appodeal SDK.
- implementation com.appodeal.ads:nodex:2.5.6 - for Nodex version;
- implementation com.appodeal.ads:maxdex:2.5.6 - for MaxDex version.
Example app-level build.gradle:
- Add Google Play Services dependencies (15.0.0 and up only):
- Add dependencies required for myTarget SDK:
- Add Android Support Library. Our SDK uses Android Support Library (version 26.1.0 and higher).
RecyclerView is required for Facebook, Inmobi, myTarget, Mopub to ensure the ads work correctly. The absence of
RecyclerView may lead to app crash.
- If your app is targeting API level 28 (Android 9.0) or above, make sure to specify the requirement for Apache HTTP Legacy library. Include the following declaration within the
<application>element of AndroidManifest.xml:
Once that's done, save the file and perform the Gradle sync.
3. Optional SDKs and libraries
If you do not want to add the Flurry SDK, please delete the dependencies below from your build.gradle file:
4. Configure AndroidManifest.xml
- Add the required permissions to your AndroidManifest.xml file under the manifest tag:
- Add the optional permissions to your AndroidManifest.xml file under the manifest tag to improve ad targeting:
- Add the following permissions necessary for the Mintegral network to work correctly to your AndroidManifest.xml under manifest tag:
2. Network security configuration
Android 9.0 (API 28) blocks cleartext (non-HTTPS) traffic by default, which can prevent ads from serving correctly. Read more on this here.
1. Add the Network Security Configuration file to your AndroidManifest.xml:2. In your network_security_config.xml file, add
3. Admob Configuration
For version 15.0.0 and higher add the lines below to the dependencies section your build.gradle file:
<meta-data>tag to the AndroidManifest file.
4. Initialize SDK
To initialize SDK add the line below to
onCreate method of your main activity:
consentValueis boolean, with 'false' meaning that the user declines to give the consent. Read our guide on collecting consent here.
YOUR_APPODEAL_APP_KEY" with the actual app key.
Use the type codes below to set the preferred ad format:
Appodeal.REWARDED_VIDEOfor rewarded videos;
Appodeal.NON_SKIPPABLE_VIDEOfor non-skippable videos;
Appodeal.NATIVEfor native ads;
Appodeal.MRECfor 300*250 banners.
Ad types can be combined using "|" operator. For example,
Appodeal.INTERSTITIAL | Appodeal.REWARDED_VIDEO.
Appodeal.NON_SKIPPABLE_VIDEO - the alias of
Appodeal.REWARDED_VIDEO. Both of them shouldn't be used together.
If you are not sure, which ad formats would suit you the best, check out our FAQ.
Third-party SDKs versions
|Facebook Audience Network||5.2.0|
|Yandex Mobile Ads||2.91|