Live Android v1
Live Android
Live
Android
Home
/
Live
/
Android
/
SDK

List live events

A user can get a list of ongoing events by using the LiveEventListQuery object. The user can filter their search by creation date, participant count, duration, live event ID and more by using the LiveEventListQueryParams object. If the user knows the URL of the live event, the user can directly find the live event by using SendbirdLive.getLiveEvent(url: String, handler: LiveEventHandler).

val params = LiveEventListQuery.Params()
val query = SendbirdLive.createLiveEventListQuery(params)
query.next { liveEvents, e ->
   if (e != null){
       return@next
   }
   // Show the list of live events to users in a list view.
}

An open channel should be available when a live event is retrieved. In case the open channel isn’t available, call fetchOpenChannel() to fetch the open channel.