Android SDK
The Monita Android SDK observes the vendor traffic leaving your app — currently Meta (Facebook), Google Firebase, Adobe Analytics and Google Ads — and streams it to the same property dashboards, detectors and alerts as your web traffic.
Before you start
Section titled “Before you start”Create a property with source type Mobile app (or reuse an existing property if you want web and app traffic together), configure your vendors, and copy the SDK token from Manage → Installation guide. See the Monita-side setup for vendor configuration.
Install
Section titled “Install”-
Add JitPack to your root
settings.gradle.kts:dependencyResolutionManagement {repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)repositories {mavenCentral()maven { url = uri("https://jitpack.io") }}} -
Add the SDK and adapter library to your module-level
build.gradle.kts:dependencies {implementation("com.github.rnadigital.monita-android-sdk:monita-android-sdk:v1.10.0")implementation("com.github.rnadigital.monita-android-sdk:monita-adapter-library:v1.10.0")byteBuddy("com.github.rnadigital.monita-android-sdk:monita-adapter-library:v1.10.0")} -
Add the Byte Buddy Gradle plugin (it wires the SDK’s interception into your build):
plugins {id("net.bytebuddy.byte-buddy-gradle-plugin") version "1.15.5"} -
Sync the project (Sync Now in Android Studio, or
./gradlew build). -
Initialize the SDK in your
Applicationclass:import android.app.Applicationimport com.rnadigital.monita_android_sdk.MonitaSDKclass MyApplication : Application() {override fun onCreate() {super.onCreate()MonitaSDK.Builder(this).enableLogger(true) // verbose logging during rollout; disable for release.setToken("<your SDK token>").setBatchSize(10).setCustomerId("123456") // joins app events to your customer IDs.setConsentString("Granted") // your consent state — feeds compliance reporting.setSessionId("123456") // joins app events into sessions.setAppVersion("1.0").build {// Initialization complete}}}
Verify
Section titled “Verify”- Run the app with
enableLogger(true)and watch Logcat for Monita upload logs returning 204. - Fire a monitored vendor event (e.g. a Firebase log event) and check the property’s Visualisation view in the app — events appear within a minute or two.