Floating widgets
A floating widget is a bubble over your app's screens. Tapping it opens an offer, a game or any Flyy screen. Which screens it shows on, what it opens, and how often it appears are all set on the dashboard. It draws inside your app's window, so no overlay permission is needed.
Turn it on
It's off by default.
- Android
- iOS
Flyy.start(this) {
partnerId = "YOUR_PARTNER_KEY"
floatingWidgets = true
}
The SDK follows your Activities and Fragments by itself.
Flyy.initialize(FlyyConfig(partnerId: "YOUR_PARTNER_KEY", floatingWidgets: true))
The SDK follows your top view controller by itself.
Name screens the SDK can't see
Compose, SwiftUI, Flutter and React Native routes don't create a new Activity or view controller. Tell the SDK the route name so dashboard rules can match it:
- Android
- iOS
Flyy.setCurrentScreen("cart")
Flyy.setCurrentScreen("cart")
Optional controls
- Android
- iOS
Flyy.showFloatingWidget("widget-id") // force one onto this screen
Flyy.hideFloatingWidget() // remove it from this screen
Flyy.setFloatingWidgetEnabled(false) // master switch, saved
Flyy.refreshFloatingWidgets() // re-fetch config now
Flyy.showFloatingWidget("widget-id")
Flyy.hideFloatingWidget()
Flyy.setFloatingWidgetEnabled(false)
Flyy.refreshFloatingWidgets()
Flyy.floatingWidgetListener = { event, id in /* analytics */ }
Flyy.floatingCtaHandler = { id, target, data in false } // true = you handled the tap
Screens show up on the dashboard
With reportScreens on (the default), each screen the SDK sees is reported once
per app version, so the dashboard offers your real screens in a picker instead of
a text box.