Release version: 3.0.1 | Release date: 08.11.2022
Follow this guide to get the best out of Appodeal.
The Appodeal SDK gives you access to 70+ Ad Demand Sources and makes them compete against each other in a real-time auction, maximizing your ad revenues. The Appodeal SDK also provides In-app Bidding, Automatic UA Optimization, User Segmentation & A/B Testing, Cross-Promotion and Direct Deals, Instant Payouts, and much more.
The following document shows how to integrate Appodeal in your Android project with your desired networks via gradle build setup, and configure all your ad formats.
Android API level 21 (Android OS 5.0) or higher.
You can use our demo app as a reference project.
To get Gradle dependencies, click Generate build.gradle. You can build gradle dependencies for a specific ad type and with a specific set of ad network adapters. To do this, select the necessary parameters below:
Disabling ad networks
We recommend using the standard Gradle config, as disabling some of the recommended adapters can negatively affect revenue.
Depend on the version of Android Studio you are using, insert into a Gradle file the generated dependencies:
Once that's done, save the file and perform the Gradle sync .
To upgrade to the Appodeal 3.0 version, please refer to the upgrade guide page.
Set Up The Project
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.
To prevent the android system from blocking http traffic, follow these steps:
1. Add the Network Security Configuration file to your AndroidManifest.xml :2. In your network_security_config.xml file, add base-config that sets cleartextTrafficPermitted to true :
Configure Admob Meta-data
Only if you use AdMob adapter.
Add your AdMob app id to meta-data tag:You may find the AdMob app id in your personal account on the AdMob page:
For more information about Admob sync check out our Admob guide.
We recommended to call initialization method in your MainActivity -
appKey - Appodeal app key you received when you created an app.
adTypes - type of advertising you want to initialize.
You may find an app key it in the list of applications in your personal account.
Use the type codes below to set the preferred ad format:
Appodeal.REWARDED_VIDEOfor rewarded videos;
Appodeal.NATIVEfor native ads;
Appodeal.MRECfor 300*250 banners.
Ad types can be combined using "|" operator. For example,
Appodeal.INTERSTITIAL | Appodeal.REWARDED_VIDEO.
If initialization succeeds, errors are null. Otherwise, it contains a list of errors.
Configure Ad Types
Appodeal SDK is now imported and you're ready to implement an ad. Appodeal offers a number of different ad formats, so you can choose the one that best fits your app's user experience.
Full-screen ad that engages users with a captivating video.
User-initiated ads where users can earn in-app rewards in exchange for viewing a video ad.
Traditional ad format that neatly places a small ad at the top or bottom of the screen.
Medium-size ads that appear within in-app content the same as banner ads.
Ad format that seamlessly fits within the context of an app’s content.
Preparing To Publish Your Application
According to Google policy, location permissions may only be requested to provide features beneficial to the user and relevant to the core functionality of the app. You cannot request access to location data for the sole purpose of advertising or analytics.
If you are not using location for the main functions of your app
- Remove location permission in your app by adding the following code to AndroidManifest.xml
- Update the app on Google Play. During the publishing process, make sure there are no location warnings in Google Play Console.
If you are using location for the main functions of your app
Some networks and 3rd party dependencies (related to network dependencies) can include their own permissions to the manifest. If you want to force remove such permissions you can refer to this guide.
Add App-ads.txt File
The app-ads.txt file is a text file which provides a mechanism for publishers to declare their authorized digital sellers. Created by IAB, it is an extension of the original ads.txt standard that was used for the same purpose in web advertising. It helps ad networks and DSPs easily verify whether an ad network or exchange they are buying your traffic from is actually allowed to sell it.
Adding app-ads.txt augments trust between advertisers, demand partners and publishers. If publishers do not have their own website where they can place an add app-ads.txt file, premium brand demand may be unavailable to them.
If you don't have app-ads.txt file yet:
Add developer website URL to your Google Play and App Store apps.
Download Appodeal's app-ads.txt from this page.
Upload app-ads.txt file to the root path of your developer website (it should look like this: example.com/app-ads.txt).
If you already have app-ads.txt:
Copy Appodeal's app-ads.txt from this page.
Paste the content to your app-ads.txt.