Skip to main content
Version: 0.1.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, CONNECTED, FAILED, DISCONNECTED, CLOSING, CLOSED.
  • 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: String?) {
when (state) {
"CONNECTING" -> Log.d("onMeetingStateChanged: ", "Meeting is Connecting")
"CONNECTED" -> Log.d("onMeetingStateChanged: ", "Meeting is Connected")
"FAILED" -> Log.d("onMeetingStateChanged: ", "Meeting connection failed")
"DISCONNECTED" -> Log.d("onMeetingStateChanged: ","Meeting connection disconnected abruptly")
"CLOSING" -> Log.d("onMeetingStateChanged: ", "Meeting is closing")
"CLOSED" -> Log.d("onMeetingStateChanged: ", "Meeting connection closed")
}
}
}

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