# Events for Android
These events are triggered at the TrueConfListener
interface level (see Example 7). It, in turn, contains the different interfaces listed below, which need to be implemented in your class during development.
# ServerStatusEventsCallback
# onServerStatus
Event triggered when a server connects/disconnects or when 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
– the port number used for connecting to the server (numeric).
# onStateChanged
Event triggered when the user's own status changes. The current status can be obtained through functions that query the current state.
# LoginEventsCallback
# onLogin
Event triggered upon authentication or authentication error on the server.
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 when the conference starts.
# onConferenceEnd
Event triggered upon conference completion.
# onInvite
Event triggered upon receiving an incoming call.
Parameters:
userId
– TrueConf ID of the calling user (string);userName
– the name of the calling user (string).
# onAccept
Event triggered when the called party receives the call.
Parameters:
userId
– TrueConf ID of the called user (string);userName
– the name of the called user (string).
# onReject
Event triggered when the callee rejects the call.
Parameters:
userId
– TrueConf ID of the called user (string);userName
– the name of the called user (string).
# onRejectTimeout
The event triggered when the called party does not respond within a specified time.
Parameters:
userId
– TrueConf ID of the called user (string);userName
– the name of the called user (string).
# onRecordRequest
Event triggered upon receiving a request for video recording.
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
Invoked when a PIN code is requested during connection to a conference with a PIN code.
Parameters:
confId
– conference ID (String
)
# onConferenceWrongPassword
Triggered when an incorrect PIN is entered while attempting to join a PIN-protected conference.
Parameters:
confId
– Conference ID (String
)
# ChatEventsCallback
# onChatMessageReceived
Event triggered upon receiving a text message.
Parameters:
fromID
– the user identifier 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
Event triggered when another user's status changes.
Parameters:
userID
- the identifier of the user whose status has changed (string);state
— new user status (UserPresStatus
).
# onContactListUpdate
Called when the list of contacts and their statuses is 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
Called when the state of the microphone or speaker changes.
Parameters:
playerMute
– speaker status (on/off) (boolean)recorderMute
– microphone status (on/off) (boolean)pair
– output device (AudioDeviceInfo
)
# onAudioDeviceResponse
Returns the current state of the audio devices in response to the requestAudioState.
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 state changes.
Parameters:
videoEnabled
– camera status (on/off) (boolean)
# LayoutCallback
# onCalculateCustomLayouts
Method for changing the coordinates and sizes of participants' video windows. See Example 7.
# onLayoutApplied
Called when the page completes its animation and becomes active.