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.
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.
build.gradle
dependencies:YOUR_VERSION
with the latest version from Jitpack.Call FlockSDK.initialize
once, ideally in your Application
class or early in your app’s startup:
Identify the current user (after login or at app start):
New: Use
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.
A placement renders a Flock referral page within your app, making it easy to prompt users to share and participate in your referral program.
openPage(context, type, ...)
method is now deprecated and will be removed in a future release.openPage
to addPlacement
.Present the referral page anywhere in your app:
You can programmatically tell the Flock modal to navigate to a different page:
This is handy if you want to show the success screen after a user enters a valid code.
Q: Is the SDK production-ready? A: Yes! FlockSDK is used in production by multiple apps and is actively maintained.
Q: Where can I get support? A: Reach out to support@withflock.com or visit our developer docs.
Q: Can I customize the UI? A: The SDK provides default modals, but you can control placement and trigger points in your app. For advanced customization, contact us.