Manual setup
This guide explains how to manually set up your project if, for any reason, you're unable to integrate the CAS Gradle plugin from the Home page.
Follow the step-by-step guide below. Optional steps can be completed at your discretion.
1. Include maven repositories
Find the repositories on the Home page.
2. Add the dependencies for the CAS SDK to your module-level build file:
dependencies {
implementation("com.cleveradssolutions:cas-sdk:4.3.0")
...
}
All adapters for supported networks are found in the com.cleveradssolutions
dependency group, and do not require additional SDK dependencies to be added.
Subscribe
SDK and Adapters versions are updated frequently and you should use the latest versions.
Subscribe to receive notifications about CAS updates.
3. Add mediated networks that are fully compatible with Google Play Families policies:
implementation("com.cleveradssolutions:ironsource:+") // IronSource
implementation("com.cleveradssolutions:google:+") // Google Ads | Admob
implementation("com.cleveradssolutions:unity:+") // Unity Ads
implementation("com.cleveradssolutions:vungle:+") // LiftoffMonetize
implementation("com.cleveradssolutions:inmobi:+") // InMobi
implementation("com.cleveradssolutions:chartboost:+") // Chartboost
implementation("com.cleveradssolutions:fyber:+") // DT Exchange
implementation("com.cleveradssolutions:kidoz:+") // Kidoz
- Read more about the adapter versions here.
- For applications targeting children or audiences under the age of 13, monetization is only allowed using ad SDKs that are certified under the Google Play Families Program.
- Kidoz and SuperAwesome provide monetization for children adience only.
4. Add mediated networks that are always recommended for app monetization.
For applications not targeting children (adult or mixed audiences), it is recommended to include the following dependencies in addition to those listed above.
implementation("com.cleveradssolutions:cas-exchange:+") // CASExchange
implementation("com.cleveradssolutions:mintegral:+") // Mintegral
implementation("com.cleveradssolutions:applovin:+") // AppLovin
implementation("com.cleveradssolutions:facebook:+") // Meta Audience Network
implementation("com.cleveradssolutions:pangle:+") // Pangle
implementation("com.cleveradssolutions:yandex:+") // Yandex Ads
implementation("com.cleveradssolutions:bigo:+") // Bigo
5. (Optional) Add other mediated networks.
implementation("com.cleveradssolutions:ysonetwork:+") // YSO Network
implementation("com.cleveradssolutions:ogury:+") // Ogury
implementation("com.cleveradssolutions:hyprmx:+") // HyprMX
implementation("com.cleveradssolutions:startio:+") // StartIO
6. (Optional) Add Cross Promo adapter.
Contact our account manager if you are interested in cross-promotion.
implementation("com.cleveradssolutions:cas-promo:+")
7. (Optional) Add Closed beta mediated networks.
implementation("com.cleveradssolutions:maticoo:+") // Maticoo
implementation("com.cleveradssolutions:prado:+") // Prado
implementation("com.cleveradssolutions:madex:+") // Madex
implementation("com.cleveradssolutions:smaato:+") // Smaato
Access to the monetization of the beta ad sources is closed. Please note that you may need to add additional maven repositories for your project. If you would like to monetize by one of these ad sources, please contact your account manager.
8. Add Play Services Ads identifier
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.1.0")
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.
To prevent the permission from getting merged into your app by including the following element in your manifest:
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>
To learn more about the com.google.android.gms.permission.AD_ID
permission declaration, including how to disable it, refer to this Play Console article.
An application must not use an advertising identifier if at least one of the following conditions is true:
- The app’s target audience includes only children, as defined in the Families Policy.
- The app is being built for devices that do not use Google Play Services (e.g. Amazon or Huawei devices).
9. Enable code minify
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 {
isMinifyEnabled = true
...
}
}
...
}
The CAS SDK and adapters come bundled with the required ProGuard rules in the AARs. Therefore, you do not need to add any additional ProGuard rules to your project.
11. Link the project
To link your project with the mediation settings, you need to have a registered account and an application in the CAS system.
If you haven't created an CAS account and registered the app yet, now's a great time to do so. If you just want to experiment or test the SDK, you can skip link your project.
- Sign In https://cas.ai.
- Select the Applications section on the right panel.
- Click the plus(+) button and follow the instructions on the form. It may take up to 30 minutes to register the app in the CAS system.
- After the registration completed, click the Action button in the row of your application

- Click Download CAS settings button. The CAS SDK uses a mediation configuration caching system to handle unexpected situations.
- A
cas_settings[settings_id].json
file will be downloaded. - Move your config file into the module (app-level)
/src/res/raw/
directory of your app.
12. Add Google Ads App ID
CAS assigns a new Google Ads (AdMob) App ID for your application to the correct operation of all features. Find the ID for each application in the CAS UI.
- After the registration completed, click the Action button in the row of your application
- Click the Show AdMob App ID button.
- Copy the id from the form.
- Add a
<meta-data>
tag withandroid:name="com.google.android.gms.ads.APPLICATION_ID"
in your app'sAndroidManifest.xml
file. - Insert AdMob app ID to
android:value
, surrounded by quotation marks, as shown below.
<manifest>
<application>
...
<!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
</application>
</manifest>
In a real app, replace the sample app ID with your actual AdMob app ID. You can use the sample ID if you're just experimenting with the SDK in a Hello World app.
Also, note that failure to add the <meta-data>
tag exactly as shown results in a crash with the message: Missing application ID
You cannot use your own identifier and must replace it with a new one generated by CAS system.