Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kontext.so/llms.txt

Use this file to discover all available pages before exploring further.

You’ll need a publisher account to obtain your publisherToken and placement codes.

1. Add the SDK

The SDK is published to Maven Central as so.kontext:ads. Make sure mavenCentral() is listed in your project’s repository configuration:
// settings.gradle.kts
dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
    }
}
Then add the dependency to your app-level build.gradle.kts:
dependencies {
    implementation("so.kontext:ads:4.0.0") // replace with the latest 4.x
}
The SDK targets Android API 26+ and is JVM 17. If your app sets a lower target/JVM, bump those before integrating.

2. Google Advertising ID (GAID)

The SDK automatically reads and forwards the Google Advertising ID with each ad request. The com.google.android.gms.permission.AD_ID permission is automatically merged into your AndroidManifest.xml via the SDK’s manifest contribution — no changes to your manifest are required. GAID is an install-time permission, so there is no runtime prompt.
If your app targets Android 13+ (API 33+) and you have explicitly set tools:node="remove" on the AD_ID permission anywhere in your manifest, remove that override or the advertising identifier will not be accessible at runtime.
If you collect GAID yourself, you can pass it directly via SessionOptions.advertisingId — that value takes priority over the SDK’s automatic collection.