Get Started

Release version:  2.10.1  | Release date: 11.06.2021

Minimum requirements:

Android API level 16 (Android OS 4.1), 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

You can use our demo app  as a reference project.

New Ad View Displaying Logic

Starting from SDK 2.8.1 we changed the logic of displaying the View ads (Banner/MREC)
See: Upgrade guide

Step 1. Import SDK

1.1 Preparing your Gradle build for Android 11

Android 11 changes how apps can query and interact with other apps that the user has installed on a device. For this reason, make sure you are using a Gradle version that matches one of those listed .

1.2  Configure build.gradle

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.

Once that's done, save the file and perform the Gradle sync .

Step 2. Set up the project

2.1 Configure AndroidManifest.xml

For the Appodeal SDK to work correctly, you need to add permissions to AndroidManifest.
We distinguish 2 sets of permissions: required permissions, without which the Appodeal SDK cannot work, and optional permissions, which are needed to improve targeting.
For more information about the purpose of each of the permissions, see the FAQ section.

  • Add the required permissions to your AndroidManifest.xml file under the manifest tag:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />

  • Add the optional permissions to your AndroidManifest.xml file under the manifest tag:

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <!--optional-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!--optional-->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <!--optional-->
<uses-permission android:name="android.permission.VIBRATE" /> <!--optional-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!--optional-->

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
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"
	tools:node="remove" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"
	tools:node="remove" />
  • 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

  • Fill out the Location permissions declaration form in  Google Play Console . You can read more about the declaration form  here .
  • Update the app on Google Play. During the publishing process, make sure there are no location warnings in Google Play Console.

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.

Request Android permissions

You can ask the user to grant optional permissions by displaying a standard dialog window.

To request WRITE_EXTERNAL_STORAGE and ACCESS_COARSE_LOCATION permissions on Android M and higher, call the following method:

Appodeal.requestAndroidMPermissions(activity, new PermissionsHelper.AppodealPermissionCallbacks() {
    @Override
    public void writeExternalStorageResponse(int result) {
        if (result == PackageManager.PERMISSION_GRANTED) {
            // WRITE_EXTERNAL_STORAGE permission was granted
        } else {
            // WRITE_EXTERNAL_STORAGE permission was NOT granted
        }
    }
    @Override
    public void accessCoarseLocationResponse(int result) {
        if (result == PackageManager.PERMISSION_GRANTED) {
            // ACCESS_COARSE_LOCATION permission was granted
        } else {
            // ACCESS_COARSE_LOCATION permission was NOT granted
        }
    }
});

WRITE_EXTERNAL_STORAGE and ACCESS_COARSE_LOCATION are optional permissions and are optional to add.

Disable permissions check

You can disable optional permission checking so that the logs do not show that no permissions have been granted.

To disable toast message "ACCESS_COARSE_LOCATION permission is missing", use the following method before the SDK initialization:

Appodeal.disableLocationPermissionCheck();

To disable toast message " WRITE_EXTERNAL_STORAGE permission is missing ", use the following method before the SDK initialization:

Appodeal.disableWriteExternalStoragePermissionCheck();

Toast messages only show in debug build.

2.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 .

To prevent the android system from blocking http traffic, follow these steps:

1. Add the Network Security Configuration file to your AndroidManifest.xml :

<?xml version="1.0" encoding="utf-8"?>
<manifest>
    <application 
		...
        android:networkSecurityConfig="@xml/network_security_config">
    </application>
</manifest>
2. In your network_security_config.xml file, add base-config that sets cleartextTrafficPermitted to true :
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config cleartextTrafficPermitted="true">
        <trust-anchors>
            <certificates src="system" />
            <certificates src="user" />
        </trust-anchors>
    </base-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">127.0.0.1</domain>
    </domain-config>
</network-security-config>

2.3 Configure Admob meta-data 

Only if you use AdMob adapter. 

All necessary dependencies are already included in the AdMob adapter.

Add your AdMob app id to meta-data tag:

<manifest>
    <application>
        <!-- Add your AdMob App ID -->
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="[ADMOB_APP_ID]"/>
    </application>
</manifest>
You may find the AdMob app id in your personal account on the AdMob page:

Step 3. Initialize SDK

Before initialization we highly recommend to receive all required permissions from user, please follow this  data protection guide .

We recommended to call initialization method in your MainActivity  - onCreate method:

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Appodeal.initialize(this, "YOUR_APP_KEY", adTypes, consent);
}

Make sure to replace YOUR_APP_KEY with the actual app key.  You can find it in the list of applications in your personal account.

Use the type codes below to set the preferred ad format:

  • Appodeal.INTERSTITIAL for interstitial;
  • Appodeal.REWARDED_VIDEO for rewarded videos;
  • Appodeal.NATIVE for native ads;
  • Appodeal.BANNER for banners;
  • Appodeal.MREC for 300*250 banners.

Please note:

Ad types can be combined using "|" operator. For example, Appodeal.INTERSTITIAL | Appodeal.REWARDED_VIDEO.

Step 4. 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.

Step 5. Preparing to publish your application

5.1  Add Privacy Policy

Make sure to add Privacy Policy to your app on Google Play that links to Appodeal's Privacy Policy to avoid violating Google Play Developer Distribution Agreement .