Integrating GMA Next-Gen SDK into an app is the first step toward displaying ads and earning revenue. Once you've integrated the SDK, you can choose an ad format (such as native or rewarded video) and follow the steps to implement it.
Before you begin
To prepare your app, complete the steps in the following sections.
App prerequisites
Make sure that your app's build file uses the following values:
- Minimum SDK version of
24or higher - Compile SDK version of
35or higher
- Minimum SDK version of
- For Kotlin apps, use the minimum Kotlin version 1.9.
Set up your app in your AdMob account
Register your app as an AdMob app by completing the following steps:
Sign in to or sign up for an AdMob account.
Register your app with AdMob. This step creates an AdMob app with a unique AdMob App ID that is needed later in this guide.
Configure your app
In your Gradle settings file, include the Google's Maven repository and Maven central repository:
Kotlin
pluginManagement { repositories { google() mavenCentral() gradlePluginPortal() } } dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() } } rootProject.name = "My Application" include(":app")
Groovy
pluginManagement { repositories { google() mavenCentral() gradlePluginPortal() } } dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() } } rootProject.name = "My Application" include ':app'
Add the dependencies for GMA Next-Gen SDK to your app-level build file: