-
Notifications
You must be signed in to change notification settings - Fork 4
Include Android
⚡ Before you start
Make sure you have correctly setup the project.
Prerequisites | |
---|---|
Minimum SDK version | 23 |
Compile SDK version | 34 |
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
}
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.
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.
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
}
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.
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?
- Follow additional steps to integrate some ad networks if used:
- Read about Advanced integration to add more ad networks.
- Get started implementation with Initialize CAS
Android SDK | iOS SDK | Unity SDK | Flutter SDK | App-ads.txt | cleveradssolutions.com | [email protected]
- Project Setup
- Include Android
- Include iOS
- Additional Network Steps
- App-ads.txt