Skip to main content
Version: 0.1.x

Display Attendees Count - Android

In this guide, we will see how you can display the number of attendees in realtime.

note

Before going forward in this guide, do make sure all the attendees join the meeting with mode as VIEWER

  • We will get the all the participants except local participant using getParticipants() method of the the Meeting class. With all the participants, we will filter out participants who have joined as a VIEWER and then display that count.
private fun showViewerCount() {
var viewerCount = 1 // start with 1 to count local participant
val participants = meeting!!.participants
for (entry: Map.Entry<String, Participant> in participants.entries) {
val participant = entry.value
if (participant.mode == "VIEWER") {
viewerCount++
}
}
this.viewerCount!!.text = viewerCount.toString()
}

API Reference

The API references for all the methods utilized in this guide are provided below.

Got a Question? Ask us on discord


Was this helpful?