Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MicroSurveys Android SDK

Native, contextual in-app micro-surveys for Android apps: ask the right user the right question at the right moment, triggered on device by the events you already track. No WebViews, no new instrumentation.

  • Platforms: Android 6.0+ (API 23) · Kotlin and Java · works with Views or Compose apps
  • Analytics: works with Amplitude out of the box, or drive it with a single track(...) call.
  • Question types: NPS, CSAT, CES, thumbs, stars, single choice, emoji, open text.

Install

Published on Maven Central. In your app module's build.gradle.kts:

dependencies {
    implementation("ai.microsurveys:microsurveys-android:0.1.0")
    // Only if you use Amplitude:
    implementation("ai.microsurveys:microsurveys-amplitude:0.1.0")
}

The latest version is on the releases page.

Quick start

In your Application:

import ai.microsurveys.MicroSurveys
import ai.microsurveys.amplitude.amplitudePlugin

class JuniperApp : Application() {
    lateinit var microSurveys: MicroSurveys

    override fun onCreate() {
        super.onCreate()
        microSurveys = MicroSurveys(this, apiKey = "ms_live_xxx") // your project's SDK key
        amplitude.add(microSurveys.amplitudePlugin())              // forward events + identity
        microSurveys.start()                                       // load config, send anything queued
    }
}

That's it: published surveys now show on their own when your existing Amplitude events fire.

No Amplitude? Drive it yourself:

microSurveys.setUser("user-123", mapOf("plan" to "pro"))
microSurveys.track("checkout_completed", mapOf("cart_size" to 3))

How it works

You publish a survey in the dashboard with a trigger (for example checkout_completed where cart_size > 2) plus eligibility rules (audience, sampling, frequency, per-user cap, schedule) and your brand theme. The SDK caches the config on device, matches every event against active triggers, and shows the survey natively, as a bottom sheet or a centered card, over the activity on screen when the user is eligible.

Docs

Project layout

Module What
microsurveys The SDK (ai.microsurveys:microsurveys-android)
microsurveys-amplitude Amplitude plugin that forwards your events and identity (ai.microsurveys:microsurveys-amplitude)
demo A small app that shows each question type without a backend

© MicroSurveys · MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages