Events for Android

TrueConfAbout 5 min

Events for Android

These events are triggered at the TrueConfListener interface level (see Example 7). It, in turn, includes various interfaces listed below, which need to be implemented in your class during development.

ServerStatusEventsCallback

onServerStatus

Event triggered when a server connects/disconnects or an error occurs during a connection attempt.

Parameters:

  • connected – indicates whether there is a connection to the server (boolean);

  • serverName – the name of the current server (String);

  • serverPort – port number used for server connection (int).

onStateChanged

This event is triggered when the user's status changes. You can obtain the current status through the functions that request the current state.

LoginEventsCallback

onLogin

Event triggered during server authorization or authorization error.

Parameters:

  • loggedIn – indicates whether the user is authenticated on the server (boolean);

  • userId – the user's TrueConf ID (String).

onLogout

Event triggered upon deauthorization on the server.

ConferenceEventsCallback

onConferenceStart

Event triggered at the start of a conference.

onConferenceEnd

The event triggered when a conference ends.

onInvite

Event triggered upon receiving an incoming call.

Parameters:

  • userIdTrueConf ID of the calling user (String);

  • userName – name of the calling user (String).

onAccept

An event triggered when the callee receives a call.

Parameters:

  • userIdTrueConf ID of the user being called (String);

  • userName – the name of the called user (String).

onReject

Event triggered when the called party declines the call.

Parameters:

  • userIdTrueConf ID of the user being called (String);

  • userName – the name of the called user (String).

onRejectTimeout

The event triggered when there is no response from the called party within a specified time frame.

Parameters:

  • userIdTrueConf ID of the user being called (String);

  • userName – the name of the called user (String).

onRecordRequest

Event triggered upon receiving a video recording request.

Parameters:

  • userID – the TrueConf ID of the user requesting the video recording (String);

  • userName – the name of the user requesting the video recording (String).

onConferencePasswordRequired

Triggered when a PIN code is requested while connecting to a conference with a PIN code.

Parameters:

onConferenceWrongPassword

This is triggered when an incorrect PIN code is entered while trying to connect to a conference that requires a PIN.

Parameters:

  • confId – conference ID (String)

ChatEventsCallback

onChatMessageReceived

Event triggered upon receiving a text message.

Parameters:

  • fromID – the identifier of the user who sent the message (String);

  • fromName – the name of the user who sent the message (String);

  • text – message text (String);

  • toID – the identifier of the user to whom the message was sent (String).

UserStatusEventsCallback

onUserStatusUpdate

An event triggered when another user's status changes.

Parameters:

  • userID – the identifier of the user with a changed status (String);

  • state – the new user status (PresenceStatus).

onContactListUpdate

Triggered when the contact list and their statuses are loaded after the user logs in to the server.

AudioDeviceCallback

onAudioDeviceChanged

Called when the output device is changed during a conference.

Parameters:

  • playerMute – speaker status (on/off) (boolean)

  • pair – output device (AudioDeviceInfo).

onAudioDeviceUpdate

Triggered when the microphone or speaker status changes.

Parameters:

  • playerMute – speaker status (on/off) (boolean)

  • recorderMute – microphone status (on/off) (boolean)

  • pair – output device (AudioDeviceInfo)

onAudioDeviceResponse

Returns the current status of audio devices upon the requestAudioState query.

Parameters:

  • playerMute – speaker status (on/off) (boolean)

  • recorderMute – microphone status (on/off) (boolean)

  • active – current output device (AudioDeviceInfo)

  • pairs – list of available output devices (List<AudioDeviceInfo>)

VideoDeviceCallback

onVideoDeviceUpdate

Called when the camera status changes.

Parameters:

  • videoEnabled – camera status (on/off) (boolean)

LayoutCallback

onCalculateCustomLayouts

A method for changing the coordinates and sizes of conference participants' video windows. See Example 7.

onLayoutApplied

Called when the page completes its animation and becomes active.