Preparing Mediated Networks - cleveradssolutions/CAS-Android Wiki

:zap: Before you start
Make sure you have correctly setup project settings.

This page shows you how to integrate CAS mediation network adapters in your app.

Add Maven repositories

Open the project-level build.gradle, and add the following repositories block:

allprojects {
  repositories {
     maven { url "" } //IronSource
     maven { url "" } //SuperAwesome
     maven { url "" } //Mintegral
     maven { url "" } //Pangle
     maven { url "" } // Smaato
     maven { url "" } //TapJoy

⭐ Starting from version 2.1.2 Clever Ads Solution migrated from Bintray to MavenCentral.


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. One dependency per solution is enough.

dependencies {
    implementation 'com.cleveradssolutions:cas:2.6.2' 
dependencies {
    implementation 'com.cleveradssolutions:cas-families:2.6.2' 

⭐ To receive release updates Subscribe

In the table you can see which partners are included in the solutions.

Network Banner Interstitial Rewarded Optimal Families Privacy Policy Notes
CAS Base :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: link Notes
Google Ads :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: link Notes
Unity Ads :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: link Notes
IronSource :heavy_minus_sign: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: link Notes
AdColony :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: link Notes
Kidoz :white_check_mark: :white_check_mark: :white_check_mark: :heavy_minus_sign: :white_check_mark: link Notes
SuperAwesome :white_check_mark: :white_check_mark: :white_check_mark: :heavy_minus_sign: :white_check_mark: link Notes
Vungle :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: link Notes
AppLovin :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: link Notes
InMobi :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: link Notes
Facebook AN :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :heavy_minus_sign: link Notes
MyTarget :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :heavy_minus_sign: link Notes
Mintegral :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :heavy_minus_sign: link Notes
Pangle :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :heavy_minus_sign: link Notes
Tapjoy :heavy_minus_sign: :white_check_mark: :white_check_mark: :white_check_mark: :heavy_minus_sign: link :heavy_minus_sign:
Yandex Ads :white_check_mark: :heavy_minus_sign: :heavy_minus_sign: :heavy_minus_sign: :heavy_minus_sign: link Notes

Google Families Ads Program

🌟 If your application does not participate in Families Ads program, then you can safely skip steps Advertising ID and App set ID.

Google is focused on providing a great experience for families on Google Play and wants to help make sure that any ads served to children are appropriate and compliant with our policies. Review google ads and monetization policy in the Developer Policy Center.

If your app's target audience includes children and serves ads using an ad SDK, you must use one of the ad SDKs below. The following ad SDKs have self-certified that their compliance with Play’s хFamilies Ads Program]( requirements.

Quote from the Google Families Ads program page.

Advertising ID

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

With Android 12 many mediation partners are starting to include the permission in the SDK’s library manifest but Families Policy, require that apps not use the Ad ID.
You must prevent the permission from getting merged into your app by including the following element in your manifest. To do this, just add the following line to your app AndroidManifest.xml file inside the <manifest> tag but outside the <application> tag:

<uses-permission android:name="" tools:node="remove"/>

App set ID

Add dependency for App set ID for use cases such as reporting and fraud prevention instead of the Advertising ID.

You can add App set ID dependencies to your application in build.gradle script:

dependencies {
  implementation ''
  implementation ''

Advanced Integration

Advanced integration makes it possible to choose any variations of mediation networks.
Feel free not to use ready-made (cas or cas-families) solutions, and choose which mediated ad networks you want to integrate by copy following dependencies to build.gradle file.

:zap: Note: When you are not using a ready-made solution, you must add a CAS Base (cas-sdk) dependency.

⚠️ Adapter versions are updated frequently and you should use the latest versions.
To receive release updates Subscribe

dependencies {
  implementation 'com.cleveradssolutions:cas-sdk:2.6.2'        // CAS Base
  implementation 'com.cleveradssolutions:google:'      // Google Ads | Admob
  implementation 'com.cleveradssolutions:unity:'        // Unity Ads
  implementation 'com.cleveradssolutions:ironsource:'  // IronSource
  implementation 'com.cleveradssolutions:adcolony:'     // AdColony
  implementation 'com.cleveradssolutions:kidoz:'        // Kidoz
  implementation 'com.cleveradssolutions:superawesome:' // SuperAwesome
  implementation 'com.cleveradssolutions:vungle:'      // Vungle
  implementation 'com.cleveradssolutions:applovin:'    // AppLovin
  implementation 'com.cleveradssolutions:inmobi:'      // InMobi
  implementation 'com.cleveradssolutions:facebook:'     // Facebook AN
  implementation 'com.cleveradssolutions:mytarget:'    // MyTarget
  implementation 'com.cleveradssolutions:mintegral:'   // Mintegral
  implementation 'com.cleveradssolutions:pangle:'       // Pangle
  implementation 'com.cleveradssolutions:tapjoy:'      // Tapjoy
  implementation 'com.cleveradssolutions:yandex:'       // Yandex Ads

Starting from version CAS 2.6.1, all adapters have been migrated to the com.cleveradssolutions dependency group and it is no longer necessary to add network SDK dependencies.

Additional instructions

Some networks require additional steps to comply with policies or to correct known issues.

Facebook Data Processing Options

For information about how to implement Facebook’s Limited Data Use flag in California, visit Facebook’s developer documentation.

If you do not want to enable Limited Data Use (LDU) mode, pass an empty string array: new String[] {} );  

To enable LDU for users and specify user geography, call setDataProcessingOptions in a form like this: new String[] {"LDU"}, 1, 1000 );

Vungle Issue

WRITE_EXTERNAL_STORAGE permission issue.
"WRITE_EXTERNAL_STORAGE" is a permission we recommend to apply for, but it is not required.
If there is any conflict with your application, you can choose to remove or modify in Androidmanifest.xml according to your project: Add line to remove permission:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" tools:node="remove"/>

Add line to modify permission if you need:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" tools:node="replace"/>

Yandex Metrica

Yandex App Metrics will be added along with Yandex Ads SDK.

Attention. You should take into account some features of the AppMetrica library during initialization. For more information, see Features of the AppMetrica library.

The code in the Application.onCreate() method runs for all processes. If you encounter an initialization error after integrating a third-party library (such as Clever Ads Solutions), make sure that the third-party library is initialized only in the main process. For more information, see Error descriptions.

What’s Next?