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") }}}
Step 2: Add the SDK Dependency
Add the Empower Mobile Ads SDK dependency to your app-level build.gradle.kts:
- Kotlin DSL
- Groovy
// app/build.gradle.ktsdependencies {implementation("net.empower.mobile.ads:empower-mobile-ads:5.6.2")}
Step 3: Configure AndroidManifest
Add your Google Ads Application ID to your AndroidManifest.xml inside the <application> tag:
<manifest><application><!-- Your existing application configuration --><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 4: 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
Optional: Mediation Adapters
The Empower Mobile Ads SDK includes built-in support for major ad networks. If you require additional mediation adapters, add the following repositories and dependencies:
Additional Repositories
- Kotlin DSL
- Groovy
// settings.gradle.ktsdependencyResolutionManagement {repositories {// ... existing repositories// For additional mediation networksmaven { url = uri("https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea") }maven { url = uri("https://artifact.bytedance.com/repository/pangle") }maven { url = uri("https://android-sdk.is.com/") }maven { url = uri("https://cboost.jfrog.io/artifactory/chartboost-ads/") }}}
Mediation Adapter Dependencies
Add any required mediation adapters based on your monetization strategy:
- Kotlin DSL
- Groovy
// app/build.gradle.ktsdependencies {// AppLovin Mediationimplementation("com.applovin.mediation:google-adapter:24.9.0.0")implementation("com.applovin.mediation:google-ad-manager-adapter:24.9.0.0")implementation("com.applovin.mediation:inmobi-adapter:11.1.1.0")implementation("com.applovin.mediation:vungle-adapter:7.7.0.0")implementation("com.applovin.mediation:bytedance-adapter:7.8.6.0.0")implementation("com.applovin.mediation:unityads-adapter:4.16.6.0")Google AdMob Mediationimplementation("com.google.ads.mediation:inmobi:11.1.0.1")implementation("com.google.ads.mediation:pangle:7.8.5.9.0")implementation("com.google.ads.mediation:unity:4.16.6.0")implementation("com.unity3d.ads:unity-ads:4.16.6")}
Note: Contact your Empower account manager for the recommended adapter configuration based on your target markets and revenue goals.