Skip to content

Android SDK: Install the SDK

  1. Create the app and an upload key in the dashboard: Apps and SDK → Create app (with your exact applicationId) → Create upload key. Copy the key (ad80_ik_...); it is shown once. See Apps and SDK setup.

  2. Unpack the bundle and add the SDK (below).

  3. Add the manifest entries (below).

  4. Grant consent in code: Ad80.setConsent(...). See Consent and controls.

  5. Check the connection on the dashboard. See Test your integration.

AD80 sends you the compiled SDK as one zip file with its checksum. It holds compiled files only, no source code, and you need no access to any repository. Your publisher key and endpoint come from the dashboard. The Google Mobile Ads SDK is not in the bundle: it stays your own dependency, from Google’s Maven repository.

Inside the zip (<version> is the version in your bundle’s file names):

maven/ Local Maven repository (dev.ad80:ad80-sdk-android and dev.ad80:ad80-sdk-core)
aar/ ad80-sdk-android-<version>.aar
jar/ ad80-sdk-core-<version>.jar
docs/ INTEGRATION.md
README.md, CHANGELOG.md, SHA256SUMS

After unzipping, check the files with sha256sum -c SHA256SUMS (macOS: shasum -a 256 -c SHA256SUMS).

Section titled “Option A: the local Maven repository (recommended)”

Unzip the bundle somewhere stable, for example third_party/ad80/. Gradle then resolves the SDK’s own dependencies for you.

settings.gradle.kts
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = uri("third_party/ad80/maven") } // path to the unzipped maven/ folder
}
}
app/build.gradle.kts
dependencies {
implementation("dev.ad80:ad80-sdk-android:<version>")
// Your own Google Mobile Ads dependency, as before.
implementation("com.google.android.gms:play-services-ads:25.5.0")
}

Copy aar/ and jar/ into your app module, for example app/libs/. Flat files carry no dependency information, so list the runtime dependencies yourself:

app/build.gradle.kts
dependencies {
implementation(files("libs/ad80-sdk-core-<version>.jar", "libs/ad80-sdk-android-<version>.aar"))
// Runtime dependencies of the AD80 SDK (a file dependency does not bring them along).
implementation("com.google.code.gson:gson:2.14.0")
implementation("androidx.startup:startup-runtime:1.2.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0")
// Your own Google Mobile Ads dependency, as before.
implementation("com.google.android.gms:play-services-ads:25.5.0")
}

The SDK is written in Kotlin. A Java-only app (without the Kotlin Gradle plugin) also needs the Kotlin standard library, version 2.1 or newer: implementation("org.jetbrains.kotlin:kotlin-stdlib:<version>").

Inside <application> in AndroidManifest.xml:

app/src/main/AndroidManifest.xml
<application>
<!-- Your app's upload key from the dashboard (Apps and SDK). -->
<meta-data
android:name="dev.ad80.PUBLISHER_KEY"
android:value="ad80_ik_YOUR_KEY" />
<!-- Where the SDK sends ads. -->
<meta-data
android:name="dev.ad80.ENDPOINT"
android:value="https://api.ad80.dev" />
<!-- Optional: false turns the SDK off for this build. -->
<meta-data
android:name="dev.ad80.ENABLED"
android:value="true" />
</application>
KeyRequiredValue
dev.ad80.PUBLISHER_KEYYesThe app’s upload key, ad80_ik_....
dev.ad80.ENDPOINTYeshttps://api.ad80.dev. Must be https; plain http is accepted only for a loopback address (local testing).
dev.ad80.ENABLEDNofalse makes the SDK inert for the whole process. Any other value, or no entry, leaves it on.

A missing key, a missing or malformed endpoint, or a plain-http endpoint that is not loopback makes the SDK inert and it reports ConfigInvalid to your diagnostics listener.

Keep the key out of source control (optional)

Section titled “Keep the key out of source control (optional)”

An upload key can only upload ads for one app, so it is meant to ship inside the app. If you still prefer not to commit it, use a manifest placeholder:

app/build.gradle.kts
android {
defaultConfig {
// Set AD80_UPLOAD_KEY in ~/.gradle/gradle.properties or as -PAD80_UPLOAD_KEY=... on CI.
manifestPlaceholders["ad80UploadKey"] = providers.gradleProperty("AD80_UPLOAD_KEY").getOrElse("")
}
}
<meta-data android:name="dev.ad80.PUBLISHER_KEY" android:value="${ad80UploadKey}" />

The AAR ships no extra rules and needs none: it uses no reflection on its own classes. Minified release builds work with your normal configuration. Keep your own rules for the Google Mobile Ads SDK as Google documents.

The SDK sends your app’s package name (applicationId) with every upload, and an upload key only accepts its own app. If a build type changes the application id (for example applicationIdSuffix ".debug"), register that id as its own app in the dashboard and give that build its own key, or the uploads are refused.

The SDK captures nothing until you call Ad80.setConsent(true). Continue with Consent and controls.