Integrate Flock’s referral and rewards platform into your Android app with the official FlockSDK. This guide covers setup, configuration, and usage for Kotlin-based Android apps.
build.gradle
dependencies:YOUR_VERSION
with the latest version from Jitpack.FlockSDK.initialize
once, ideally in your Application
class or early in your app’s startup:
New: UseA placement renders a Flock referral page within your app, making it easy to prompt users to share and participate in your referral program.addPlacement(context, placementId, ...)
instead ofopenPage(context, type, ...)
for opening campaign pages. Each campaign page now has a uniqueplacementId
for more robust and future-proof integration.
openPage(context, type, ...)
method is now deprecated and will be removed in a future release.openPage
to addPlacement
.