Skip to main content

For in-call event listeners, register them on the ICallSession object.

mCallSession.addListener("SingleCallActivity", this);

The callback events are defined as follows.

interface ICallSessionListener {
//call connected
void onCallConnect();

//call ended
void onCallFinish(CallConst.CallFinishReason finishReason);

//in-call error callback
void onErrorOccur(CallConst.CallErrorCode errorCode);

// a user is invited (group calls only)
void onUsersInvite(String inviterId, List<String> userIdList);

// a user joins the call (group calls only)
void onUsersConnect(List<String> userIdList);

// a user leaves the call (group calls only)
void onUsersLeave(List<String> userIdList);

// a user enables or disables the camera
void onUserCameraEnable(String userId, boolean enable);

// a user unmutes or mutes the microphone
void onUserMicrophoneEnable(String userId, boolean enable);

// a user's audio level changes
// userId is the key and audio level is the value
void onSoundLevelUpdate(HashMap<String, Float> soundLevels);

// callback triggered when the first video frame is rendered
void onVideoFirstFrameRender(String userId);
}