Skip to content

Include Android

Dmytro edited this page Dec 23, 2024 · 19 revisions

⚡ Before you start
Make sure you have correctly setup the project.



Prerequisites
Minimum SDK version 23
Compile SDK version 34

Add 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 Android module Gradle file (usually <project>/android/app/build.gradle), add the CAS services plugin inside the plugins block.

plugins {
    id("com.cleveradssolutions.gradle-plugin") version "3.9.8"
}

cas {
    // Plugin configuration
}

Note

To receive release updates Subscribe

Add Ads Solution

CAS is a mediation platform that requires selecting desired ad networks for monetizing your application.

You can choose one of the ready-made solutions or integrate each adapter separately. Such solutions do not require you to add each network adapter separately.

If you already know what to expect from ad networks and are ready to select the set of adapters yourself, after completing the steps on this page, please refer to the Advanced Integration page. Or consult your account manager for assistance.

Add one of the following lines of the standard Clever Ads Solution to module build.gradle file.

An Optimal Ads Solution

Contains a number of stable ads networks that are recommended for use in most applications:
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.

A Families Ads Solution

Designed for applications tagged at a children's audience and fully compatible with the Google Play Families Policies. Contains:
Google Ads, Unity Ads, IronSource, LiftoffMonetize, InMobi, Chartboost, DTExchange, Kidoz, SuperAwesome.

cas {
    includeFamiliesAds = true
}

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

Your must define cas.useAdvertisingId = false

  • If the target audience for app only includes children as described in the Families Policy
  • If app are building for devices that do not utilize Google Play Services, skip this step. For example Amazon or Huawei.

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?