Avaya Client SDK

< Back to Package Overview

Monitoring Participant Events

Using the Client SDK, you can easily monitor participant related events in a conference call.

For monitoring events related to the conference Participant (e.g., new participants joining the conference or participants dropping from the conference), you can define an object that implements the ConferenceListener interface.

Implement ConferenceListener interface

To monitor participants joining or leaving a conference, implement the ConferenceListener interface for the Conference. This listener interface provides notifications for monitoring conference events and onConferenceParticipantsChanged notification whenever there is a change in the active participants list.

AppConferenceListener implements ConferenceListener
{
    @Override
    public void onConferenceParticipantsChanged(Conference conference, 
    DataCollectionChangeType dataCollectionChangeType, 
    List list) {
        // Called to report that participants have been changed in the underlying
        // conference. DataCollectionChangeType indicates the type of changes in 
        // the participants list 
        // (i.e., ITEMS_ADDED, ITEMS_DELETED or ITEMS_UPDATED).
        // Add code to update application UI for added/deleted/updated
        // participants.
    }

    ...
};

Add Conference Listener to Conference

To monitor changing of active participants for the conference, add ConferenceListener when the call becomes a conference.

AppConferenceListener conferenceListener = new AppConferenceListener();
...

@Override
public void onCallEstablished(Call call) {
    if (call.isConference()) {
        call.getConference().addListener(conferenceListener);
    }
}

@Override
public void onCallConferenceStatusChanged(Call call, boolean isConference) {
    if (isConference) {
        call.getConference().addListener(conferenceListener);
    }
}