MaestroOverlay
Overview
The Maestro SDK provides tools for enhancing user experiences in betting apps, including the MaestroOverlay()
composable for displaying celebratory overlays when users win bets. This document outlines the current implementation, planned dynamic overlay functionality using the MaestroEventDelegate
interface.
MaestroOverlay Feature
Current Implementation
The MaestroOverlay()
composable allows manual display of a celebratory overlay when a user wins a bet.
Usage
- Initialize the Maestro SDK with a delegate conforming to
MaestroEventDelegate
. - Use the
MaestroOverlay()
composable in your Jetpack Compose UI.
Example:
@Composable
fun BetResultScreen(betWon: Boolean) {
if (betWon) {
MaestroOverlay()
}
}
Limitations
- Requires manual invocation.
- No dynamic triggering or dismissal logic.
Future Implementation (Planned)
The SDK will dynamically trigger the overlay using shouldShowOverlay()
and shouldHideOverlay()
methods in the MaestroEventDelegate
interface.
Delegate Methods
shouldShowOverlay(betId: String)
: Notifies the client app to display the overlay for a specificbetId
.shouldHideOverlay()
: Notifies the client app to dismiss the overlay.
Planned Workflow
- SDK detects a bet win .
- SDK calls
shouldShowOverlay(betId)
on the client delegate. - Client app shows
MaestroOverlay()
(e.g., via state update). - SDK calls
shouldHideOverlay()
after a duration/event. - Client app hides the overlay.