Migrating from Android v1
v2 is a drop-in replacement for the v1 Android SDK. Every v1 method still
exists under its old name, with the same signature, and calls the same backend
endpoint. A facade under the old package theflyy.com.flyy means you don't need
to change any imports.
1. Swap the dependency
build.gradle.kts
repositories {
maven { url = uri("https://cdn.flyyx.in/maven") }
}
dependencies {
// remove the v1 SDK, then:
implementation("com.theflyy:flyy:2.1.0")
}
2. Remove what v2 no longer needs
- AppCompat / Material dependencies you only added for Flyy
- Flyy ProGuard rules (the AAR ships its own)
FlyyAppLifecycleHandlerregistration — lifecycle is installed automatically
3. Build and run
That's it. Optionally, adopt the v2 quick start later — Flyy.start
replaces init plus the setters.
What changed
| v1 | v2 |
|---|---|
| Native Android screens for every feature | One rewards UI (web) in a WebView — the same screens on Android and iOS, updated over the air |
FlyyMyMessagingService | FlyyMessagingService, or Flyy.handlePush(data) in your own service |
FlyyDialogActivity, FlyyRewardWonDialogActivity, FlyyAlertToastActivity | FlyyPopupActivity — the same show* APIs, now rendered in your app's theme |
setCustomFont(Typeface…) | Logs only — a Typeface can't be loaded by a WebView. Use setCustomFontName with files in assets/fonts/ |
| Custom-view styling setters | Compile, but only log. The theme drives the look |
setBaseFlyyDomain("host") | Accepts the bare host (as in v1) or a full URL |
Behaviour you can now rely on
- Callbacks fire on the real result — only on a 2xx that isn't
{"success": false}. - Setters called before
init(the v1 documented order) are buffered, applied at init, and survive process death. - Every navigation adds
FLAG_ACTIVITY_NEW_TASK, so an Application or Service context is safe. - An invalid partner id or environment refuses to init and logs, as in v1.
Flyy.MOCKmaps to stage with a log — never to production.
UI flag setters
The v1 UI-tweak setters (hideCheckinButton, setRTLsupport, setReferralCodeHide,
setExpiryLabelHide, hideQuizCoinsSection, setConfettiColors, …) all still
work. Each is sent to the rewards UI, which renders it in every variant.