Skip to content
Str4tos edited this page Mar 8, 2024 · 41 revisions
Prerequisites
Minimum SDK version 21+
Compile SDK version 33+
Gradle 7.1+

Add Maven repositories

Add the following repositories block to the settings.gradle file so that Gradle can download the artifacts of ad networks:

dependencyResolutionManagement {
  repositories {
    google()  
    mavenCentral()  
    maven {  
        name = "IronSourceAdsRepo"  
        url = "https://android-sdk.is.com/"  
        content { it.includeGroup("com.ironsource.sdk") }  
    }  
    maven {  
        name = "MintegralAdsRepo"  
        url = "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea"  
        content { it.includeGroup("com.mbridge.msdk.oversea") }  
    }  
    maven {  
        name = "PangleAdsRepo"  
        url = "https://artifact.bytedance.com/repository/pangle"  
        content { it.includeGroup("com.pangle.global") }  
    }  
    maven {  
        name = "SuperAwesomeAdsRepo"  
        url = "https://aa-sdk.s3-eu-west-1.amazonaws.com/android_repo"  
        content { it.includeGroup("tv.superawesome.sdk.publisher") }  
    }  
    maven {  
        name = "ChartboostAdsRepo"  
        url = "https://cboost.jfrog.io/artifactory/chartboost-ads/"  
        content { it.includeGroup("com.chartboost") }  
    }
    maven {  
        name = "MadexAdsRepo"  
        url = "https://sdkpkg.sspnet.tech"  
        content {  
            it.includeGroup("sspnet.tech")  
            it.includeGroup("sspnet.tech.adapters")  
        }  
    }
    maven {  
        name = "HyprMXAdsRepo"  
        url = "https://hyprmx.jfrog.io/artifactory/hyprmx"  
        content { it.includeGroup("com.hyprmx.android") }  
    }
    maven {  
        name = "SmaatoAdsRepo"  
        url = "https://s3.amazonaws.com/smaato-sdk-releases/"  
        content { it.includeGroup("com.smaato.android.sdk") }  
    }  
  }
}

Add Ads Solution

Clever Ads Solutions provide ready-made solutions for you to choose from.
Such solutions do not require you to add each network adapter separately in dependencies.
Add one of the following dependencies of the standard Clever Ads Solution to your app-level build.gradle file.

  • An Optimal Ads Solutions contains a number of stable partner networks that are recommended for use in most applications.
implementation("com.cleveradssolutions:cas:3.5.6")
  • A Families Ads Solutions designed for applications tagged at a children's audience and fully compatible with the Google Play Families Policies.
implementation("com.cleveradssolutions:cas-families:3.5.6")
  • A Base SDK of CleverAdsSolutions only without dependencies on third party adapters. Using only the base SDK, you can add any adapters separately, read more about Advanced integration.
implementation("com.cleveradssolutions:cas-sdk:3.5.6")

In the following table, you can see all the ad networks supported by Clever Ads Solutions. And a list of partners that are included in the Optimal and Families Ads solutions.

Note

To receive release updates Subscribe

Network Optimal Families Notes
Google Ads ☑️ ☑️ Notes
Unity Ads ☑️ ☑️ Notes
IronSource ☑️ ☑️ Notes
LiftoffMonetize ☑️ ☑️ Notes
InMobi ☑️ ☑️ Notes
Yandex Ads ☑️ Notes
Mintegral ☑️ Notes
Pangle ☑️
Chartboost ☑️ ☑️ Notes
DTExchange ☑️ ☑️ Notes
AppLovin ☑️ Notes
AudienceNetwork ☑️ Notes
Bigo ☑️ Notes
Kidoz ☑️ Notes
SuperAwesome ☑️ Notes
MyTarget Notes

Warning

Please note that some ad networks require you to do Additional integration steps: Google AdMob, Meta AudienceNetwork, Yandex Mobile Ads.

Enable code minification

Enabling minifyEnabled is a crucial step in optimizing your mobile application, especially when integrating ad mediation SDKs that augment your codebase's size. By leveraging code minification, you not only reduce the overall footprint of your app but also enhance its performance, security, and compatibility.

android {
    buildTypes {  
        release {  
            minifyEnabled true
            ...
        }  
    }
    ...
}

Google Advertising Identifier

Note

If you are building for devices that do not utilize Google Play Services, skip this step. For example Amazon or Huawei.

The Advertising ID is a unique, user-resettable, and user-deletable ID for advertising, provided by Google Play services.

Add the Play Services Ads identifier into the dependencies block to allow GAID information to be retrieved.

implementation("com.google.android.gms:play-services-ads-identifier:18.0.1")

Additionally, apps will need to declare a Google Play Services normal permission in the AndroidManifest.xml file as follows:

<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>

Some SDKs, such as the Google Mobile Ads SDK may already declare this permission in the SDK’s library manifest.

If your app uses these SDKs as dependencies, the AD_ID permission from the SDK’s library manifest will be merged with your app’s main manifest by default, even if you don’t explicitly declare the permission in your app’s main manifest.

If the target audience for your app only includes children as described in the Families Policy, then you must prevent the permission from getting merged into your app by including the following element in your manifest. Just declare the remove node as follows:

<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>

Optional permissions 

The following permissions are not required for our SDK or 3rd-party SDKs to function, but including them in your AndroidManifest.xml may result in improved eCPM and user experience.

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>  
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

🔗 Done! What’s Next?