Skip to main content

Overview

FlockSDK-Android enables seamless integration of Flock referral and rewards into your Android applications. Effortlessly build powerful referral programs and track customer engagement in minutes.
  • Identify and track users
  • Trigger checkpoints to show Flock experiences at specific moments in your user journey
  • Officially supported by the Flock team

Requirements

  • Android 6.0 (API 23) or later
  • Kotlin 1.7 or later
  • Android Gradle Plugin 7.0 or later

Installation

  1. Add the SDK to your build.gradle dependencies:
  1. Replace YOUR_VERSION with the latest version from Jitpack.

Usage

1. Configure the SDK

Call FlockSDK.initialize once, ideally in your Application class or early in your app’s startup:

2. Identify Your User

Identify the current user (after login or at app start):

3. Trigger Checkpoints

Trigger checkpoints to show Flock experiences at specific moments in your user journey.

Basic Usage

Checkpoint with Callbacks

Use navigation within success callbacks to show success screens after successful actions:

Checkpoint Options

The checkpoint system automatically loads campaign checkpoints when you call identify(). Make sure to call identify() before triggering any checkpoints.
Available Methods:
  • navigate(): Navigate within existing web view instead of creating a new placement
  • onClose(): Handle when the checkpoint is closed
  • onSuccess(): Handle successful checkpoint completion
  • onInvalid(): Handle invalid checkpoint events
  • trigger(context): Trigger the checkpoint with configured options (requires Android context)

Why Flock?

  • No UI to build – We handle the referral screens for you.
  • Fully managed backend and analytics.
  • Easy integration and customization.
  • Official support and regular updates.

Support


License

FlockSDK-Android is released under the MIT License.