-
Notifications
You must be signed in to change notification settings - Fork 4
Project Setup
⚡ Prerequisites:
- Android Studio 3.2 or higher
-
minSdkVersion
19 or higher -
compileSdkVersion
31 or higher - Gradle 4.2 or higher
Add the following repositories
block to the root-level build.gradle
file so that Gradle can download the artifacts of ad networks:
allprojects {
repositories {
google()
mavenCentral()
maven { url = "https://android-sdk.is.com/" } // IronSource
maven { url = "https://aa-sdk.s3-eu-west-1.amazonaws.com/android_repo" } // SuperAwesome
maven { url = "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea" } // Mintegral
maven { url = "https://artifact.bytedance.com/repository/pangle" } // Pangle
maven { url = "https://sdk.tapjoy.com/" } // TapJoy
}
}
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.
Add one of the following dependencies
of the standard Clever Ads Solution to your app-level build.gradle
file.
- An Optimal Ads Solutions contains a number of stable partner networks that are recommended for use in most applications.
implementation 'com.cleveradssolutions:cas:2.9.9'
- A Families Ads Solutions designed for applications tagged at a children's audience.
The solution is fully compatible with apps in the Google Families Ads Program, read more below.
implementation 'com.cleveradssolutions:cas-families:2.9.9'
- A Base SDK of CleverAdsSolutions only without dependencies on third party adapters. Using only the base SDK, you can add any adapters separately.
implementation 'com.cleveradssolutions:cas-sdk:2.9.9'
In the following table, you can see all the ad networks supported by Clever Ads Solutions. And a list of partners that are included in the Optimal and Families Ads solutions.
⭐ Those ad networks that are not included in standard solutions can be added separately, read more about Advanced integration.
⚠️ Please note that some ad networks require you to do Additional integration steps: Google AdMob, Meta AudienceNetwork, Yandex Mobile Ads.
Network | Banner | Interstitial | Rewarded | Optimal | Families | Notes |
---|---|---|---|---|---|---|
CAS Base | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | Notes |
Google Ads | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | Notes |
Unity Ads | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | Notes |
IronSource | ➖ | ☑️ | ☑️ | ☑️ | ☑️ | Notes |
AdColony | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | Notes |
Kidoz | ☑️ | ☑️ | ☑️ | ➖ | ☑️ | Notes |
SuperAwesome | ☑️ | ☑️ | ☑️ | ➖ | ☑️ | Notes |
Vungle | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | Notes |
AppLovin | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | Notes |
InMobi | ☑️ | ☑️ | ☑️ | ☑️ | ☑️ | Notes |
Meta AN | ☑️ | ☑️ | ☑️ | ☑️ | ➖ | Notes |
MyTarget | ☑️ | ☑️ | ☑️ | ☑️ | ➖ | Notes |
Mintegral | ☑️ | ☑️ | ☑️ | ☑️ | ➖ | Notes |
Pangle | ☑️ | ☑️ | ☑️ | ☑️ | ➖ | ➖ |
Tapjoy | ➖ | ☑️ | ☑️ | ☑️ | ➖ | Notes |
Yandex Ads | ☑️ | ☑️ | ☑️ | ➖ | ➖ | Notes |
Chartboost | ☑️ | ☑️ | ☑️ | ➖ | ➖ | Notes |
DigitalTurbine | ☑️ | ☑️ | ☑️ | ➖ | ➖ | Notes |
Adding CAS SDK to your project includes many third party mediation libraries and may cause the 64K limit on methods that can be packaged in an Android DEX file to be breached.
Consider the following suggestions to reduce the total number of methods added to your project:
You can enable ProGuard to shrink your project code. It will discard any unused classes at the time of compilation to make the total method count as small as possible.
Enable it by setting minifyEnabled true
in build.gradle
for the appropriate buildTypes
, and by providing the rules to keep the classes required by your project.
Note 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.
If you are still above a 65K method count, enabling MultiDEX may be the only solution provided by Google. You must only configure your project to MultiDex one time, but it will have an impact on build and app startup time.
Enable the MultiDEX support library to enable building your app correctly.
- Open your application
build.gradle
script. - Modify the
defaultConfig
to mark your application as multidex enabled:
defaultConfig {
...
multiDexEnabled true
}
- Add the following line to the
dependencies
element.
dependencies {
implementation 'androidx.multidex:multidex:2.0.1'
...
}
🔗 Done! What’s Next?
- Link the project with CAS service
- Read about Advanced integration to add more ad networks.
- Integration
- Initialization
- Additional mediation steps
- Google Play data disclosure
- App-ads.txt🔗
- App Open Ad
- Banner Ad
- Interstitial Ad
- Rewarded Ad
- Native Ad