Android

A Kotlin library with the same shape as the Swift SDK: configure once, track screens and events, and let the offline queue upload in batches. No advertising ID is read or sent.

Install

app/build.gradle.kts
dependencies {
    implementation("ai.pagebee:pagebee:0.1.0")
}

The library adds the INTERNET permission to your manifest.

Configure

TallyApp.kt
class TallyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        Pagebee.configure(
            this,
            siteKey = "pb_pk_your_site_key",
            apiUrl = "https://api.pagebee.ai",
        )
    }
}

Screens, events and revenue

kotlin
Pagebee.screen("Settings")
Pagebee.track("Exported PDF", mapOf("pages" to 12))
Pagebee.track("Upgraded", mapOf("plan" to "pro"), Revenue(999, "GBP"))   // minor units

Environments

Debug builds are sent as staging. Pass environment = PagebeeEnvironment.PRODUCTION to configure to override it.