Integration
This guide explains how to add the Empower Mobile Ads SDK to your Android project.
Step 1: Add the Maven Repository
Add the Empower Maven repository to your project-level settings.gradle.kts (or build.gradle(project-level) for Groovy):
- Kotlin DSL
- Groovy
// settings.gradle.ktsdependencyResolutionManagement {repositories {google()mavenCentral()maven { url = uri("https://maven.empower.net/release") }}}
That's it for repositories. When the SDK adds or removes a network in a future release, just bump the version above — nothing else changes.
Step 2: Add Dependencies
The SDK ships with two mediation bundles. Choose the one that matches your play-services-ads version:
Default Bundle (GMA 24.x+, minSdk 23) -- Recommended
For apps using play-services-ads version 24.0.0 or higher:
// app/build.gradle.ktsdependencies {implementation("net.empower.mobile.ads:empower-mobile-ads:5.7.10")implementation("net.empower.mobile.ads:empower-mobile-ads-mediation:5.7.10")}
Legacy Bundle (GMA below 24, minSdk 21)
For apps using play-services-ads below version 24.0.0:
// app/build.gradle.ktsdependencies {implementation("net.empower.mobile.ads:empower-mobile-ads:5.7.10")implementation("net.empower.mobile.ads:empower-mobile-ads-mediation-legacy:5.7.10")}
How to choose: Check your
play-services-adsversion. If 24.0.0 or higher, use the default bundle. If below 24.0.0 or if your app requires minSdk 21, use the legacy bundle.
Step 3: Configure Java 11 and Core Library Desugaring
The SDK is compiled with Java 11 and requires core library desugaring. Add the following to your app's build.gradle.kts:
// app/build.gradle.ktsandroid {compileOptions {sourceCompatibility = JavaVersion.VERSION_11targetCompatibility = JavaVersion.VERSION_11isCoreLibraryDesugaringEnabled = true}kotlin {jvmToolchain(11)}}dependencies {coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")}
Note: Java 11 is the minimum required version. If your app already uses Java 17 or higher, you can keep your existing setting — the SDK is forward-compatible.
Step 4: Configure AndroidManifest
Add your Google Ads Application ID to your AndroidManifest.xml inside the <application> tag:
<manifest><application><meta-dataandroid:name="com.google.android.gms.ads.APPLICATION_ID"android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/></application></manifest>
Note: Replace the value with your actual Google Ads Application ID. Contact Empower support if you need assistance obtaining this ID.
Step 5: Sync Your Project
After adding the dependencies, sync your project with Gradle files:
- Click File > Sync Project with Gradle Files in Android Studio
- Wait for the sync to complete successfully
Excluding Mediation Networks
Both mediation bundles include all supported networks by default. To exclude a specific network, use Gradle's exclude mechanism:
implementation("net.empower.mobile.ads:empower-mobile-ads-mediation:5.7.5") {exclude(group = "com.google.ads.mediation", module = "pangle")exclude(group = "com.applovin.mediation", module = "vungle-adapter")}
Bundled Mediation Networks
AppLovin Mediation Adapters
| Network | Exclude Group | Exclude Module |
|---|---|---|
com.applovin.mediation | google-adapter | |
| Google Ad Manager | com.applovin.mediation | google-ad-manager-adapter |
| Meta / Facebook Audience Network | com.applovin.mediation | facebook-adapter |
| Unity Ads | com.applovin.mediation | unityads-adapter |
| Vungle | com.applovin.mediation | vungle-adapter |
| Pangle / ByteDance | com.applovin.mediation | bytedance-adapter |
| Mintegral | com.applovin.mediation | mintegral-adapter |
| InMobi | com.applovin.mediation | inmobi-adapter |
| Fyber / DT Exchange | com.applovin.mediation | fyber-adapter |
| PubMatic | com.applovin.mediation | pubmatic-adapter |
| Ogury | com.applovin.mediation | ogury-presage-adapter |
| Yandex | com.applovin.mediation | yandex-adapter |
Google AdMob Mediation Adapters
| Network | Exclude Group | Exclude Module |
|---|---|---|
| InMobi | com.google.ads.mediation | inmobi |
| Mintegral | com.google.ads.mediation | mintegral |
| Pangle | com.google.ads.mediation | pangle |
| Unity Ads | com.google.ads.mediation | unity |
Verification
To verify the integration is successful, build your project. You can inspect the resolved mediation dependencies with:
./gradlew :app:dependencies --configuration releaseRuntimeClasspath | grep mediation
Common Issues
| Issue | Solution |
|---|---|
| Dependency resolution failed | Make sure the settings plugin is applied in settings.gradle.kts |
| minSdkVersion conflict | Use empower-mobile-ads-mediation-legacy if your app has minSdk below 23 |
| Duplicate class errors | Check for conflicting ad network versions from other dependencies |
| Core library desugaring error | Enable isCoreLibraryDesugaringEnabled and add the desugaring dependency |