Early access preview

Android quickstart

This guide takes a fresh Android app from no Caliper to a live “how did you hear about us” survey that fires once after first open and writes the answer into Adjust as an install-level event. Plan on about ten minutes.

1. Add the Gradle dependency

Add the Caliper Maven coordinate to your module’s build.gradle:

dependencies {
    implementation("co.caliper:caliper-android:1.+")
}

If your settings file restricts repositories, make sure mavenCentral() is in the list. Sync Gradle.

Caliper does not read the Google Advertising ID, does not fingerprint the device, and requires no consent prompt of its own to function. The answer is reported directly by the person using the app, so the result is first-party by construction.

2. Configure in Application.onCreate

Configure Caliper once, in your Application subclass, before any activity starts. Pass the application context.

import co.caliper.Caliper
import co.caliper.Survey
import co.caliper.Trigger
import co.caliper.Destination

class ExampleApp : Application() {
    override fun onCreate() {
        super.onCreate()
        Caliper.configure(context = this, apiKey = "cal_live_…")
        Caliper.survey(Survey.HOW_DID_YOU_HEAR)
            .after(Trigger.FIRST_OPEN)
            .sync(Destination.ADJUST, Destination.SLACK)
    }
}

Register the class in your manifest with android:name=".ExampleApp" if it is not already. Caliper.survey(...) selects the question, .after(Trigger.FIRST_OPEN) waits for the first launch on a clean install and schedules the survey for the next natural pause, and .sync(...) names the destinations. Initialize the Adjust SDK in the same onCreate so its event API is ready.

3. Run it on a clean install

Uninstall the app first — the survey fires once per install, keyed off first open, so a reinstall is the only way to trigger it again. Launch the app. After first open you will see one closed-option survey with answers in randomized order and a prominent Skip. A skipped survey is better than a guessed answer, so reaching skip is intentionally low-friction.

4. Confirm it in Adjust

When someone answers, Caliper forwards the response as a custom in-app event through Adjust’s SDK-to-SDK event API, attached to that install. Open the app’s events in your Adjust dashboard. A how_did_you_hear event will appear carrying the chosen answer as a property — visible in dashboards and postbacks like any other in-app event, so installs can be segmented by self-reported source next to your network data.

Next steps