Integration
This guide explains how to install the Flutter plugin and configure both Android and iOS native projects.
Step 1: Install the Package
Add the dependency to your pubspec.yaml:
pubspec.yaml
dependencies:
empower_mobile_ads: ^0.9.3
Plugin 0.9.3 bundles native Android SDK 5.8.14. Use that same version wherever the Android settings plugin is applied below.
Then run:
flutter pub get
Step 2: Android Configuration
Add the Maven Repository
Add the Empower Maven repository to your project-level android/build.gradle:
// android/build.gradle
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://maven.empower.net/release' }
}
}
Or if your project uses settings.gradle (newer Flutter versions):
// android/settings.gradle
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url 'https://maven.empower.net/release' }
}
}
Configure AndroidManifest
Add the following <meta-data> tags inside the <application> block of android/app/src/main/AndroidManifest.xml:
<application>
<!-- Existing configuration -->
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:value="true"/>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
</application>
Note: Replace the
APPLICATION_IDvalue with your actual Google Ads Application ID. Contact Empower support if you need assistance obtaining this ID.