Set up GMA Next-Gen SDK

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 24 or higher
    • Compile SDK version of 35 or higher
  • 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:

  1. Sign in to or sign up for an AdMob account.

  2. 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

  1. 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'
  2. Add the dependencies for GMA Next-Gen SDK to your app-level build file: