Skip to main content

Quick start

Three steps. When you finish, your app opens the Flyy rewards screen for a signed-in user.

:::info Before you start You need your partner key from the Flyy dashboard → Settings. Use the STAGE environment while you build, then switch to PRODUCTION. :::

1. Add the SDK​

settings.gradle.kts
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = uri("https://cdn.flyyx.in/maven") }
}
}
app/build.gradle.kts
dependencies {
implementation("com.theflyy:flyy:2.1.0")
}

2. Initialize​

MainActivity.kt
import com.theflyy.sdk.Flyy
import com.theflyy.sdk.FlyyEnvironment

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Flyy.start(this) {
partnerId = "YOUR_PARTNER_KEY"
environment = FlyyEnvironment.STAGE
user = "user-1001" // your own user id
themeColor = "#7C3AED"
}
}

Flyy.start is safe to call on every onCreate. Repeat calls do nothing.

3. Open rewards​

rewardsButton.setOnClickListener { Flyy.open(this) }

That's a working integration. Next: