Get Started on Android
Before You Begin
- Sign up for a Chartboost Mediation (formerly Helium) account.
- Add apps to the Mediation Dashboard. (See Import Apps)
- Set up Ad Placements in the Mediation Dashboard. (See Manage Placements)
Minimum Supported Development Tools
Software | Version |
---|---|
Android Studio | 2020.3.1+ |
Android OS | 5.0+ (API level 21) |
Kotlin | 1.7.20 |
Add the Mediation SDK to Your Project
For build.gradle
repositories {
maven {
name "Chartboost Mediation’s maven repo"
url "https://cboost.jfrog.io/artifactory/chartboost-mediation"
}
}
dependencies {
implementation 'com.chartboost:chartboost-mediation-sdk:4.0.0'
}
Add 3rd-Party Dependencies
implementation "org.greenrobot:eventbus:3.3.1"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.20"
implementation "org.jetbrains.kotlin:kotlin-reflect:1.7.20"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1"
Add Google Play Services
Add the Google Play Services Library as a dependency of your project. For detailed instructions, reference the official integration instructions for Google Play Services.
Instead of referencing the entire Google Play Services package, you only need play-services-base
, play-services-ads-identifier
, and play-services-appset
:
implementation 'com.google.android.gms:play-services-base:18.0.1'
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
implementation 'com.google.android.gms:play-services-appset:16.0.2'
OPTIONAL: Mediation Android Sample App
The Mediation Android Sample App is available on our public GitHub repo.
Updated 8 days ago