Skip to main content
Version: 0.3.x

Meeting Connection Events - Android

VideoSDK provides onMeetingStateChanged event which will notify you of the current connection state of the meeting.

onMeetingStateChanged​

  • This event will be triggered when state of meeting changes.

  • It will pass state as an event callback parameter which will indicate current state of the meeting.

  • All available states are :

    • CONNECTING: The meeting is in the process of establishing a connection.
    • CONNECTED: The meeting has successfully connected.
    • RECONNECTING: The meeting is trying to reconnect after the connection was lost.
    • DISCONNECTED: The meeting has been disconnected.
  • You can implement this method of the abstract Class MeetingEventListener and add the listener to Meeting class using the addEventListener() method of Meeting Class.

Example​

Here is the usage of the event mentioned in this page.

private val meetingEventListener: MeetingEventListener = object : MeetingEventListener() {
override fun onMeetingStateChanged(state: MeetingState) {
when (state) {
MeetingState.CONNECTING -> {
Log.d("onMeetingStateChanged", "Meeting is Connecting")
}
MeetingState.CONNECTED -> {
Log.d("onMeetingStateChanged", "Meeting is Connected")
}
MeetingState.RECONNECTING -> {
Log.d("onMeetingStateChanged", "Meeting is RECONNECTING")
}
MeetingState.DISCONNECTED -> {
Log.d("onMeetingStateChanged", "Meeting is Disconnected")
}
}
}

}

override fun onCreate(savedInstanceState: Bundle?) {
//...

// add listener to meeting
meeting!!.addEventListener(meetingEventListener)
}

API Reference​

The API references for all the methods and events utilised in this guide are provided below.

Got a Question? Ask us on discord