Skip to content

Include Android

Dmytro Uzhva edited this page May 15, 2025 · 21 revisions

⚡ Before you start
Make sure you have correctly set up the project.



Prerequisites
Minimum SDK version 23
Compile SDK version 34

Integration CAS SDK

The CAS SDK provide a Gradle Plugin to simplify and automate certain integration steps. Our plugin will automatically add mediated network dependencies to your project, which you configure in an cas { } block.

In your module (app-level) Gradle file (usually <project>/<app-module>/build.gradle), add the CAS services plugin inside the plugins block.

plugins {
  id("com.android.application") // before CAS plugin
  id("com.cleveradssolutions.gradle-plugin") version "4.0.2"
}

cas {
  // Plugin configuration
}

Note

To receive release updates Subscribe

Google Advertising Identifier

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

cas {
    useAdvertisingId = true
}

Note

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

Mediated Networks

CAS.AI SDK offers three integration paths. Choose one based on your app’s target audience. If you're unsure which solution best fits your application, please contact your account manager.

Optimal Ads Solution

Recommended for most applications targeting a general or mixed audience. Includes a broad set of stable, high-performance networks: Google Ads, Unity Ads, IronSource, LiftoffMonetize, InMobi, Yandex Ads, Mintegral, Pangle, Chartboost, DTExchange, AppLovin, AudienceNetwork, Bigo, CASExchange

cas {
    includeOptimalAds = true
}

Warning

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

Families Ads Solution

Required for applications directed exclusively at children, in accordance with the Google Play Families Policy. Networks included: Google Ads, Unity Ads, IronSource, LiftoffMonetize, InMobi, Chartboost, DTExchange, Kidoz, SuperAwesome

cas {
    includeFamiliesAds = true
}

Warning

Please note that some ad networks require you to do Additional integration steps: Google AdMob

Choice networks

Advanced publishers who are familiar with ad network integrations can choose their own set of adapters. If you have any questions or need assistance, please contact your account manager.

Follow the instructions on the Include Android Advanced page.

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" />  

🔗 Next
Initialization

Clone this wiki locally