Skip to content
Chumbaq

Quick start

Android

Three calls: start the SDK, tell it who the user is, and turn on push. Ten minutes if your push setup already works.

1. Install

build.gradle.kts
dependencies {
    implementation(platform("com.chumbaq:chumbaq-bom:0.1.0"))

    implementation("com.chumbaq:chumbaq-core")
    implementation("com.chumbaq:chumbaq-push")       // optional
    implementation("com.chumbaq:chumbaq-banners")    // optional
    implementation("com.chumbaq:chumbaq-messages")   // optional
}

2. Start the SDK and identify the user

Find your API key and project ID in your project's settings. Read them from your app's config rather than hard-coding them. Call identify right after login with your own user ID.

app start-up
val config = ChumbaqConfig.Builder(
    baseUrl = "https://your-chumbaq-host",
    apiKey = "<project API key>",
    projectId = "<project id>",
).build()

Chumbaq.init(context, config)

// Who this is, once they log in.
Chumbaq.identify(IdentifyParams.Builder().externalUserId("u_42").build())

3. Turn on push

ChumbaqMessagingService is declared in the module's own manifest. It registers tokens, reports delivery, impressions, clicks and dismissals, and renders images, carousels, countdowns and up to three action buttons.

push
ChumbaqPush.init(context)
ChumbaqPush.registerToken(fcmToken)   // or let the service pick it up

4. Show in-app messages

Tell the SDK when the app opens, which screen is showing and what the user did. Messages wait for their trigger, and the native SDK draws them.

in-app triggers
ChumbaqMessages.setMessageListener(listener)

ChumbaqMessages.onAppOpen(context)                  // app foreground
ChumbaqMessages.onScreenView(context, "Home")       // screen change
ChumbaqMessages.onEvent(context, "purchase")        // custom event

Next