Installation
Ask AI about this page
| Artifact | Contents | Required |
|---|---|---|
com.qartvelo.ads:core:0.3.0 |
API client, config cache, rendering, event delivery, banner view | Yes |
com.qartvelo.ads:admob:0.3.0 |
Fallback adapter for Google Mobile Ads (play-services-ads 25.4.0) |
Optional |
Requirements
Section titled “Requirements”minSdk23 or higher,compileSdk35 or higher- Java 17 toolchain, AndroidX
- Core brings OkHttp 4.12, Media3 ExoPlayer 1.8 and AndroidX core. It does not depend on Google Mobile Ads; only the adapter does, as a normal (never shaded) dependency, so a newer
play-services-adsin your app wins.
Add the repository and dependencies
Section titled “Add the repository and dependencies”The SDK is published on JitPack (built from the Qartvelo-com/ads tags). No account or token is needed.
dependencyResolutionManagement { repositories { google() mavenCentral() maven("https://jitpack.io") { content { includeGroup("com.qartvelo.ads") } } }}dependencies { implementation("com.qartvelo.ads:core:0.3.0") // Optional: fall back to your own AdMob ad units. Leave out to run Qartvelo Ads only. implementation("com.qartvelo.ads:admob:0.3.0")}dependencyResolutionManagement { repositories { google() mavenCentral() maven { url "https://jitpack.io" content { includeGroup("com.qartvelo.ads") } } }}dependencies { implementation "com.qartvelo.ads:core:0.3.0" implementation "com.qartvelo.ads:admob:0.3.0" // optional}[versions]qartvelo-ads = "0.3.0"
[libraries]qartvelo-ads-core = { module = "com.qartvelo.ads:core", version.ref = "qartvelo-ads" }qartvelo-ads-admob = { module = "com.qartvelo.ads:admob", version.ref = "qartvelo-ads" }dependencies { implementation(libs.qartvelo.ads.core) implementation(libs.qartvelo.ads.admob)}The adapter is discovered at runtime by class name, so adding or removing com.qartvelo.ads:admob needs no code change. Without it, the SDK works normally and reports onNoAdAvailable when Qartvelo Ads has no ad.
Manifest
Section titled “Manifest”core merges the INTERNET permission and its full-screen ad Activity automatically. Nothing else is needed for Qartvelo Ads.
If you include the AdMob adapter, Google requires your own AdMob App ID, or the Google Mobile Ads SDK crashes the app at start-up:
<application> <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY" /></application>For development you can use Google’s sample App ID ca-app-pub-3940256099942544~3347511713.
R8 / ProGuard
Section titled “R8 / ProGuard”Both libraries ship consumer rules. Minified release builds need no extra configuration.
Local backend (optional)
Section titled “Local backend (optional)”If you run your own Qartvelo Ads backend on your machine for development, the emulator reaches it at http://10.0.2.2:8000/. Allow cleartext HTTP for that host in debug builds only:
<network-security-config> <domain-config cleartextTrafficPermitted="true"> <domain includeSubdomains="false">10.0.2.2</domain> <domain includeSubdomains="false">localhost</domain> </domain-config></network-security-config><manifest xmlns:android="http://schemas.android.com/apk/res/android"> <application android:networkSecurityConfig="@xml/network_security_config" /></manifest>Production always uses HTTPS (https://ads.qartvelo.com/, the default).
Next: Initialization.