MeetingEventListener Class - Android
implementation
- You can implement all the methods of
MeetingEventListenerabstract Class and add the listener toMeetingclass using theaddEventListener()method ofMeetingClass.
Example
- Kotlin
- Java
private final MeetingEventListener meetingEventListener = new MeetingEventListener() {
override fun onMeetingJoined() {
Log.d("#meeting", "onMeetingJoined()")
}
}
private final MeetingEventListener meetingEventListener = new MeetingEventListener() {
@Override
public void onMeetingJoined() {
Log.d("#meeting", "onMeetingJoined()");
}
}
onMeetingJoined()
- This event will be emitted when a localParticipant successfully joined the meeting.
Example
- Kotlin
- Java
override fun onMeetingJoined() {
Log.d("#meeting", "onMeetingJoined()")
}
@Override
public void onMeetingJoined() {
Log.d("#meeting", "onMeetingJoined()");
}
onMeetingLeft()
- This event will be emitted when a localParticipant left the meeting.
Example
- Kotlin
- Java
override fun onMeetingLeft() {
Log.d("#meeting", "onMeetingLeft()")
}
@Override
public void onMeetingLeft() {
Log.d("#meeting", "onMeetingLeft()");
}
onParticipantJoined()
- This event will be emitted when a new participant joined the meeting.
Event callback parameters
- participant: Participant
Example
- Kotlin
- Java
override fun onParticipantJoined(participant: Participant) {
Log.d("#meeting", participant.displayName + " joined");
}
@Override
public void onParticipantJoined(Participant participant) {
Log.d("#meeting", participant.getDisplayName() + " joined");
}
onParticipantLeft
- This event will be emitted when a joined participant left the meeting.
Event callback parameters
- participant: Participant
Example
- Kotlin
- Java
override fun onParticipantLeft(participant: Participant) {
Log.d("#meeting", participant.displayName + " left");
}
@Override
public void onParticipantLeft(Participant participant) {
Log.d("#meeting", participant.getDisplayName() + " left");
}
onSpeakerChanged()
- This event will be emitted when a active speaker changed.
- If you want to know which participant is actively speaking, then this event will be used.
- If no participant is actively speaking, then this event will pass
nullas en event callback parameter.
Event callback parameters
- participantId: String
Example
- Kotlin
- Java
override fun onSpeakerChanged(participantId: String?) {
//
}
@Override
public void onSpeakerChanged(String participantId) {
//
}
onPresenterChanged()
- This event will be emitted when any participant starts or stops screen sharing.
- It will pass
participantIdas an event callback parameter. - If a participant stops screensharing, then this event will pass
nullas en event callback parameter.
Event callback parameters
- participantId: String
Example
- Kotlin
- Java
override fun onPresenterChanged(participantId: String) {
//
}
@Override
public void onPresenterChanged(String participantId) {
//
}
onEntryRequested()
- This event will be emitted when a new participant who is trying to join the meeting, is having permission
ask_joinin token. - This event will only be emitted to the participants in the meeting, who is having the permission
allow_joinin token. - This event will pass following parameters as an event parameters,
participantIdandnameof the new participant who is trying to join the meeting,allow()anddeny()to take required actions.
Event callback parameters
- peerId: String
- name: String
Example
- Kotlin
- Java
override fun onEntryRequested(id: String?, name: String?) {
//
}
@Override
public void onEntryRequested(String id, String name) {
//
}
onEntryResponded()
- This event will be emitted when the
join()request is responded. - This event will be emitted to the participants in the meeting, who is having the permission
allow_joinin token. - This event will be also emitted to the participant who requested to join the meeting.
Event callback parameters
- participantId: String
- decision: "allowed" | "denied"
Example
- Kotlin
- Java
override fun onEntryResponded(id: String?, decision: String?) {
//
}
@Override
public void onEntryResponded(String id, String decision) {
//
}
onWebcamRequested()
- This event will be emitted to the participant
Bwhen any other participantArequests to enable webcam of participantB. - On accepting the request, webcam of participant
Bwill be enabled.
Event callback parameters
- participantId: String
- listener: WebcamRequestListener { accept: Method; reject: Method }
Example
- Kotlin
- Java
override fun onWebcamRequested(participantId: String, listener: WebcamRequestListener) {
// if accept request
listener.accept()
// if reject request
listener.reject()
}
@Override
public void onWebcamRequested(String participantId, WebcamRequestListener listener) {
// if accept request
listener.accept();
// if reject request
listener.reject();
}
onMicRequested()
- This event will be emitted to the participant
Bwhen any other participantArequests to enable mic of participantB. - On accepting the request, mic of participant
Bwill be enabled.
Event callback parameters
- participantId: String
- listener: MicRequestListener { accept: Method; reject: Method }
Example
- Kotlin
- Java
override fun onMicRequested(participantId: String, listener: MicRequestListener) {
// if accept request
listener.accept()
// if reject request
listener.reject()
}
@Override
public void onMicRequested(String participantId, MicRequestListener listener) {
// if accept request
listener.accept();
// if reject request
listener.reject();
}
onRecordingStateChanged()
- This event will be emitted when the meeting's recording status changed.
Event callback parameters
- recordingState: String
recordingState has following values
RECORDING_STARTING- Recording is in starting phase and hasn't started yet.RECORDING_STARTED- Recording has started successfully.RECORDING_STOPPING- Recording is in stopping phase and hasn't stopped yet.RECORDING_STOPPED- Recording has stopped successfully.
Example
- Kotlin
- Java
override fun onRecordingStateChanged(recordingState: String) {
when (recordingState) {
"RECORDING_STARTING" -> {
Log.d("onRecordingStateChanged", "Meeting recording is starting")
}
"RECORDING_STARTED" -> {
Log.d("onRecordingStateChanged", "Meeting recording is started")
}
"RECORDING_STOPPING" -> {
Log.d("onRecordingStateChanged", "Meeting recording is stopping")
}
"RECORDING_STOPPED" -> {
Log.d("onRecordingStateChanged", "Meeting recording is stopped")
}
}
}
@Override
public void onRecordingStateChanged(String recordingState) {
switch (recordingState) {
case "RECORDING_STARTING":
Log.d("onRecordingStateChanged", "Meeting recording is starting");
break;
case "RECORDING_STARTED":
Log.d("onRecordingStateChanged", "Meeting recording is started");
break;
case "RECORDING_STOPPING":
Log.d("onRecordingStateChanged", "Meeting recording is stopping");
break;
case "RECORDING_STOPPED":
Log.d("onRecordingStateChanged", "Meeting recording is stopped");
break;
}
}
onRecordingStarted()
This event will be deprecated soon
- This event will be emitted when recording of the meeting is started.
Example
- Kotlin
- Java
override fun onRecordingStarted() {
//
}
@Override
public void onRecordingStarted() {
//
}
onRecordingStopped()
This event will be deprecated soon
- This event will be emitted when recording of the meeting is stopped.
Example
- Kotlin
- Java
override fun onRecordingStopped() {
//
}
@Override
public void onRecordingStopped() {
//
}
onLivestreamStateChanged()
- This event will be emitted when the meeting's livestream status changed.
Event callback parameters
- livestreamState: String
livestreamState has following values
LIVESTREAM_STARTING- Livestream is in starting phase and hasn't started yet.LIVESTREAM_STARTED- Livestream has started successfully.LIVESTREAM_STOPPING- Livestream is in stopping phase and hasn't stopped yet.LIVESTREAM_STOPPED- Livestream has stopped successfully.
Example
- Kotlin
- Java
override fun onLivestreamStateChanged(livestreamState: String?) {
when (livestreamState) {
"LIVESTREAM_STARTING" -> Log.d( "LivestreamStateChanged",
"Meeting livestream is starting"
)
"LIVESTREAM_STARTED" -> Log.d( "LivestreamStateChanged",
"Meeting livestream is started"
)
"LIVESTREAM_STOPPING" -> Log.d("LivestreamStateChanged",
"Meeting livestream is stopping"
)
"LIVESTREAM_STOPPED" -> Log.d("LivestreamStateChanged",
"Meeting livestream is stopped"
)
}
}
@Override
public void onLivestreamStateChanged(String livestreamState) {
switch (livestreamState) {
case "LIVESTREAM_STARTING":
Log.d("LivestreamStateChanged", "Meeting livestream is starting");
break;
case "LIVESTREAM_STARTED":
Log.d("LivestreamStateChanged", "Meeting livestream is started");
break;
case "LIVESTREAM_STOPPING":
Log.d("LivestreamStateChanged", "Meeting livestream is stopping");
break;
case "LIVESTREAM_STOPPED":
Log.d("LivestreamStateChanged", "Meeting livestream is stopped");
break;
}
}
onLivestreamStarted()
This event will be deprecated soon
- This event will be emitted when
RTMPlive stream of the meeting is started.
Example
- Kotlin
- Java
override fun onLivestreamStarted() {
//
}
@Override
public void onLivestreamStarted() {
//
}
onLivestreamStopped()
This event will be deprecated soon
- This event will be emitted when
RTMPlive stream of the meeting is stopped.
Example
- Kotlin
- Java
override fun onLivestreamStopped() {
//
}
@Override
public void onLivestreamStopped() {
//
}
onHlsStateChanged()
- This event will be emitted when the meeting's HLS(Http Livestreaming) status changed.
Event callback parameters
-
HlsState: { status: String}
statushas following values :HLS_STARTING- HLS is in starting phase and hasn't started yet.HLS_STARTED- HLS has started successfully.HLS_PLAYABLE- HLS can be playable now.HLS_STOPPING- HLS is in stopping phase and hasn't stopped yet.HLS_STOPPED- HLS has stopped successfully.
-
when you receive
HLS_PLAYABLEstatus you will receive 2 urls in responseplaybackHlsUrl- Live HLS with playback supportlivestreamUrl- Live HLS without playback support
downstreamUrl is now depecated. Use playbackHlsUrl or livestreamUrl in place of downstreamUrl
Example
- Kotlin
- Java
override fun onHlsStateChanged(HlsState: JSONObject) {
when (HlsState.getString("status")) {
"HLS_STARTING" -> Log.d("onHlsStateChanged", "Meeting hls is starting")
"HLS_STARTED" -> Log.d("onHlsStateChanged", "Meeting hls is started")
"HLS_PLAYABLE" -> {
Log.d("onHlsStateChanged", "Meeting hls is playable now")
// on hls playable you will receive playbackHlsUrl and livestreamUrl
val playbackHlsUrl = HlsState.getString("playbackHlsUrl")
val livestreamUrl = HlsState.getString("livestreamUrl")
}
"HLS_STOPPING" -> Log.d("onHlsStateChanged", "Meeting hls is stopping")
"HLS_STOPPED" -> Log.d("onHlsStateChanged", "Meeting hls is stopped")
}
}
@Override
public void onHlsStateChanged(JSONObject HlsState) {
switch (HlsState.getString("status")) {
case "HLS_STARTING":
Log.d("onHlsStateChanged", "Meeting hls is starting");
break;
case "HLS_STARTED":
Log.d("onHlsStateChanged", "Meeting hls is started");
break;
case "HLS_PLAYABLE":
Log.d("onHlsStateChanged", "Meeting hls is playable now");
// on hls started you will receive playbackHlsUrl and livestreamUrl
String playbackHlsUrl = HlsState.getString("playbackHlsUrl");
String livestreamUrl = HlsState.getString("livestreamUrl");
break;
case "HLS_STOPPING":
Log.d("onHlsStateChanged", "Meeting hls is stopping");
break;
case "HLS_STOPPED":
Log.d("onHlsStateChanged", "Meeting hls is stopped");
break;
}
}
onTranscriptionStateChanged()
- This event will be triggered whenever state of realtime transcription is changed.
Event callback parameters
- data: { status: String, id: String }
- status: String
- id: String
status has following values
TRANSCRIPTION_STARTING- Realtime Transcription is in starting phase and hasn't started yet.TRANSCRIPTION_STARTED- Realtime Transcription has started successfully.TRANSCRIPTION_STOPPING- Realtime Transcription is in stopping phase and hasn't stopped yet.TRANSCRIPTION_STOPPED- Realtime Transcription has stopped successfully.
Example
- Kotlin
- Java
override fun onTranscriptionStateChanged(data: JSONObject) {
//Status can be :: TRANSCRIPTION_STARTING
//Status can be :: TRANSCRIPTION_STARTED
//Status can be :: TRANSCRIPTION_STOPPING
//Status can be :: TRANSCRIPTION_STOPPED
val status = data.getString("status")
Log.d("MeetingActivity", "Transcription status: $status")
}
@Override
public void onTranscriptionStateChanged(JSONObject data) {
//Status can be :: TRANSCRIPTION_STARTING
//Status can be :: TRANSCRIPTION_STARTED
//Status can be :: TRANSCRIPTION_STOPPING
//Status can be :: TRANSCRIPTION_STOPPED
String status = data.getString("status");
Log.d("MeetingActivity", "Transcription status: " + status);
}
onTranscriptionText()
- This event will be emitted when text for running realtime transcription received.
Event callback parameters
- data: TranscriptionText
- TranscriptionText.participantId: String
- TranscriptionText.participantName: String
- TranscriptionText.text: String
- TranscriptionText.timestamp: int
- TranscriptionText.type: String
Example
- Kotlin
- Java
override fun onTranscriptionText(data: TranscriptionText) {
val participantId = data.participantId
val participantName = data.participantName
val text = data.text
val timestamp = data.timestamp
val type = data.type
Log.d("MeetingActivity", "$participantName: $text $timestamp")
}
@Override
public void onTranscriptionText(TranscriptionText data) {
String participantId = data.getParticipantId();
String participantName = data.getParticipantName();
String text = data.getText();
int timestamp = data.getTimestamp();
String type = data.getType();
Log.d("MeetingActivity", participantName + ": " + text + " " + timestamp);
}
onWhiteboardStarted()
- This event will be triggered when the whiteboard is successfully started.
Event callback parameters
url: String
Example
- Kotlin
- Java
override fun onWhiteboardStarted(url: String) {
super.onWhiteboardStarted(url)
//...
}
@Override
public void onWhiteboardStarted(String url) {
super.onWhiteboardStarted(url);
//...
}
onWhiteboardStopped()
- This event will be triggered when the whiteboard session is successfully terminated.
Example
- Kotlin
- Java
override fun onWhiteboardStopped() {
super.onWhiteboardStopped()
//...
}
@Override
public void onWhiteboardStopped() {
super.onWhiteboardStopped();
//...
}
onExternalCallStarted()
- This event will be emitted when local particpant receive incoming call.
Example
- Kotlin
- Java
override fun onExternalCallStarted() {
//
}
@Override
public void onExternalCallStarted() {
//
}
onMeetingStateChanged()
- This event will be emitted when state of meeting changes.
- It will pass
stateas an event callback parameter which will indicate current state of the meeting. - All available states are
CONNECTING,CONNECTED,RECONNECTING,DISCONNECTED.
Event callback parameters
- state: MeetingState
Example
- Kotlin
- Java
override fun onMeetingStateChanged(state: ConnectionState) {
super.onMeetingStateChanged(state)
Log.d("TAG", "onMeetingStateChanged: $state")
}
@Override
public void onMeetingStateChanged(ConnectionState state) {
super.onMeetingStateChanged(state);
Log.d("TAG", "onMeetingStateChanged: "+ state);
}
onExternalCallRinging()
This callback is triggered when the user's phone starts ringing. whether it’s a traditional phone call or a VoIP call (e.g., WhatsApp).
This event allows us to detect when the user is receiving an external call.
Example
- Kotlin
- Java
override fun onExternalCallRinging() {
Log.d("#meeting", "onExternalCallAnswered: User phone is ringing")
}
@Override
public void onExternalCallRinging() {
Log.d("#meeting", "onExternalCallAnswered: User phone is ringing");
}
onExternalCallStarted()
This callback is triggered when the user answers an external phone call. whether it’s a traditional phone call or a VoIP call (e.g., WhatsApp).
This event allows us to detect when the user has started a call.
Example
- Kotlin
- Java
override fun onExternalCallStarted() {
Log.d("#meeting", "onExternalCallAnswered: User call is answered")
}
@Override
public void onExternalCallStarted() {
Log.d("#meeting", "onExternalCallAnswered: User call is answered");
}
onExternalCallHangup()
This callback is triggered when an external call ends, whether it’s a traditional phone call or a VoIP call (e.g., WhatsApp).
This event detects when a call has ended
Example
- Kotlin
- Java
override fun onExternalCallHangup() {
Log.d("#meeting", "onExternalCallAnswered: User call ends")
}
@Override
public void onExternalCallHangup() {
Log.d("#meeting", "onExternalCallAnswered: User call ends");
}
onPausedAllStreams()
- This callback is triggered when all or specified media streams within the meeting are successfully paused
Parameters
kind: Specifies the type of media stream that was paused.- Type:
String - Possible values:
"audio": Indicates that audio streams have been paused."video": Indicates that video streams have been paused."share": Indicates that screen-sharing video streams have been paused
- Type:
Example
- Kotlin
- Java
override fun onPausedAllStreams(kind: String) {
Log.d("TAG", "onPausedAllStreams: $kind")
super.onPausedAllStreams(kind)
}
@Override
public void onPausedAllStreams(String kind) {
Log.d("TAG", "onPausedAllStreams: " + kind);
super.onPausedAllStreams(kind);
}
onResumedAllStreams()
- This callback is triggered when all or specified media streams within the meeting are successfully resumed
Parameters
kind: Specifies the type of media stream that was resumed.- Type:
String - Possible values:
"audio": Indicates that audio streams have been resumed."video": Indicates that video streams have been resumed."share": Indicates that screen-sharing video streams have been resumed
- Type:
Example
- Kotlin
- Java
override fun onResumedAllStreams(kind: String) {
Log.d("TAG", "onResumedAllStreams: $kind")
super.onResumedAllStreams(kind)
}
@Override
public void onResumedAllStreams(String kind) {
Log.d("TAG", "onResumedAllStreams: " + kind);
super.onResumedAllStreams(kind);
}
onParticipantModeChanged()
This event is triggered when a participant's mode is updated.
It passes data as an event callback parameter, which includes the following:
-
SEND_AND_RECV: Both audio and video streams will be produced and consumed. -
SIGNALLING_ONLY: Audio and video streams will not be produced or consumed. It is used solely for signaling. -
RECV_ONLY: Only audio and video streams will be consumed without producing any. This event is triggered when a participant's mode is updated.
Event Callback Parameters
- data:
{ mode: String, participantId: String }- mode:
String - participantId:
String
- mode:
Important Changes Android SDK in Version v0.2.0
- The following modes have been deprecated:
CONFERENCEhas been replaced bySEND_AND_RECVVIEWERhas been replaced bySIGNALLING_ONLY
Please update your implementation to use the new modes.
⚠️ Compatibility Notice:
To ensure a seamless meeting experience, all participants must use the same SDK version.
Do not mix version v0.2.0 + with older versions, as it may cause significant conflicts.
Example
- Kotlin
- Java
override fun onParticipantModeChanged(data: JSONObject?) {
//...
}
@Override
public void onParticipantModeChanged(JSONObject data) {
//...
}
onPinStateChanged()
- This event will be triggered when any participant got pinned or unpinned by any participant got pinned or unpinned by any participant.
Event callback parameters
- pinStateData: { peerId: String, state: JSONObject, pinnedBy: String }
- peerId: String
- state: JSONObject
- pinnedBy: String
Example
- Kotlin
- Java
override fun onPinStateChanged(pinStateData: JSONObject?) {
Log.d("onPinStateChanged: ", pinStateData.getString("peerId")) // id of participant who were pinned
Log.d("onPinStateChanged: ", pinStateData.getJSONObject("state")) // { cam: true, share: true }
Log.d("onPinStateChanged: ", pinStateData.getString("pinnedBy")) // id of participant who pinned that participant
}
@Override
public void onPinStateChanged(JSONObject pinStateData) {
Log.d("onPinStateChanged: ", pinStateData.getString("peerId")); // id of participant who were pinned
Log.d("onPinStateChanged: ", pinStateData.getJSONObject("state")); // { cam: true, share: true }
Log.d("onPinStateChanged: ", pinStateData.getString("pinnedBy")); // id of participant who pinned that participant
}
onMediaRelayRequestReceived()
- This callback is triggered when a request is recieved for media relay in the destination meeting.
Event callback parameters
-
participantId - (String): Specifies the participantId who requested the media relay. -
meetingId - (String): Specifies the meeting from where the media relay request was made. -
listener - (RelayRequestListener): A callback interface with the following methods:- accept(): Call this to approve the media relay request.
- reject(): Call this to deny the media relay request.
Example
- Kotlin
- Java
override fun onMediaRelayRequestReceived(participantId: String,liveStreamId: String,listener: RelayRequestListener) {
// If accepting the request
listener.accept()
// If rejecting the request
listener.reject()
}
@Override
public void onMediaRelayRequestReceived(String participantId, String liveStreamId, RelayRequestListener listener) {
// if accept request
listener.accept();
// if reject request
listener.reject();
}
onMediaRelayRequestResponse()
- This callback is triggered when a response is recieved for media relay request in the source meeting.
Event callback parameters
-
participantId - (String): Specifies the participantId who responded the request for the media relay. -
decision - (String): Specifies the decision whether the request for media relay was accepted or not.
Example
- Kotlin
- Java
override fun onMediaRelayRequestResponse(participantId: String, decision: String) {
super.onMediaRelayRequestResponse(participantId, decision)
Log.d("MediaRelay", "Participant ID: $participantId, Decision: $decision")
}
@Override
public void onMediaRelayRequestResponse(String participantId, String decision) {
super.onMediaRelayRequestResponse(participantId, decision);
Log.d("MediaRelay", "Participant ID: " + participantId + ", Decision: " + decision);
}
onMediaRelayStarted()
- This callback is triggered when the media relay to the destination meeting succesfully starts.
Parameters
meetingId - (String): Specifies the meeting where the media relay started.
Example
- Kotlin
- Java
override fun onMediaRelayStarted(relayMeetingId: String) {
super.onMediaRelayStarted(relayMeetingId)
Log.d("MediaRelay", "Media relay started to meeting ID: $relayMeetingId")
}
override fun onMediaRelayStarted(relayMeetingId: String) {
super.onMediaRelayStarted(relayMeetingId)
Log.d("MediaRelay", "Media relay started to meeting ID: $relayMeetingId")
}
onMediaRelayStopped()
- This callback is triggered when the media relay to the destination meeting stops for any reason.
Parameters
-
meetingId - (String): Specifies the meeting where the media relay stopped. -
reason - (String): Specifies the reason why the media relay stopped
Example
- Kotlin
- Java
override fun onMediaRelayStopped(meetingId: String, reason: String) {
super.onMediaRelayStopped(meetingId, reason)
Log.d("MediaRelay", "Media relay stopped for meeting ID: $meetingId, Reason: $reason")
}
@Override
public void onMediaRelayStopped(String meetingId, String reason) {
super.onMediaRelayStopped(meetingId, reason);
Log.d("MediaRelay", "Media relay stopped for meeting ID: " + meetingId + ", Reason: " + reason);
}
onMediaRelayError()
- This callback is triggered when an error occurs during media relay to the destination meeting.
Parameters
-
meetingId - (String): Specifies the meeting where the media relay stopped. -
error - (String): Specifies the error that occured.
Example
- Kotlin
- Java
override fun onMediaRelayError(meetingId: String, error: String) {
super.onMediaRelayError(meetingId, error)
Log.e("MediaRelay", "Media relay error for meeting ID: $meetingId, Error: $error")
}
@Override
public void onMediaRelayError(String meetingId, String error) {
super.onMediaRelayError(meetingId, error);
Log.e("MediaRelay", "Media relay error for meeting ID: " + meetingId + ", Error: " + error);
}
Got a Question? Ask us on discord

