Sports You Watch Events

LucraEventListener emits lifecycle updates for Sports You Watch contests so hosts can respond without polling.

LucraEventListener setuparrow-up-right

Listening for SYW events

LucraClient().setEventListener(object : LucraEventListener {
    override fun onEvent(event: LucraEvent) {
        when (event) {
            is LucraEvent.GamesContest.Accepted -> {
                Log.d("Lucra SDK", "Sports contest accepted: ${event.contestId}")
            }
            is LucraEvent.SportsContest.Created -> {
                Log.d("Lucra SDK", "Sports contest created: ${event.contestId}")
            }
            is LucraEvent.SportsContest.Canceled -> {
                Log.d("Lucra SDK", "Sports contest canceled: ${event.matchupId}")
            }
            else -> Unit
        }
    }
})

Event reference

  • GamesContest.Accepted – Fires when a sports (or games) contest invitation is accepted. Use contestId to refresh dashboards or analytics.

  • SportsContest.Created – Emitted immediately after a sports matchup is created. Capture the contestId to deep-link participants or cache the contest.

  • SportsContest.Canceled – Triggered when a sports contest is canceled before settlement. matchupId lets you remove pending UI or notify participants.

Last updated