Android Features
Android Features
Below is a list of functions used in development with Android Studio IDE.
Functions of the SDK instance
They are called at the instance level of TrueConf Mobile SDK, obtained through the function TrueConfSDK.getInstance(). For example, TrueConfSDK.getInstance().registerApp(this).
registerApp
It records a subclass of Application. This method must be called before start.
Parameters:
application– theApplicationclass (Class).
addTrueconfListener
Connecting a listener.
Parameters:
listener– listener class (TrueconfListener).
removeTrueconfListener
Disabling the listener.
Parameters:
listener– listener class (TrueconfListener).
setFallbackActivity
Records the Activity class to return to when the call ends. This method must be called.
Parameters:
activity– theActivityclass (Class).
start
Starting the SDK.
Parameters:
serverList(optional) – list of servers (String);checkPermissions– whether to check permissions if necessary (boolean).
stop
Stopping the SDK instance and releasing resources.
isStarted
Checking the operational status of the SDK instance (boolean).
IServerManager
These functions are invoked at the IServerManager interface level, which is obtained by calling the TrueConfSDK.getServerManager() function.
isConnectedToServer
Checking connection to the server.
Return value (boolean) – true if there is a connection to the server, false if the connection is absent.
isLoggedIn
Checking authorization status.
Return value (boolean) – true indicates the user is authorized on the server, false means the user is not authorized.
loginAs
Authorization as a specific user with specified parameters on the server.
Parameters:
user– user ID (String);pwd– password (String);encryptPassword–trueif the password is transmitted in plain text (and the SDK needs to encrypt it),falseif it is already encrypted (boolean);enableAutoLogin– whether to automatically log in the user with this ID upon restart (boolean).
Return value (boolean) – true if the authorization request was sent to the server, false if authorization cannot be performed.
scheduleLoginAs
Retrieving a list of operations that need to be performed sequentially, including the server to connect to, account identification data, and call recipient. It is equivalent to the function parseProtocolLink, where the parameters are not passed as a protocol string, but separately. String parameters may be empty.
Parameters:
login– user identifier (String);pwd– password (String);encryptPassword–trueif the password is transmitted in plain text (and the SDK needs to encrypt it),falseif it is already encrypted (boolean);callToUser– the identifier of the called subscriber (String);autoClose– whether to close the server session after completing or interrupting a call (boolean);loginTemp– indicates a temporary login. This means the client should be deauthorized after the call (boolean);loginForce– enforced login. Authentication will occur even if the client is already authenticated on the server (boolean);domain– the domain where automatic server search will be performed (String);serversList– the list of servers to connect to (String);isPublic– a parameter indicating that callToUser is the name of a conference, not a username. If this parameter is incorrect, the call to the user or connection to the conference will not be executed (boolean).
logout
Deauthorize (log out) an account without disconnecting the SDK from the video conferencing server.
Return value (boolean) - true if the deauthorization request was sent to the server, false if deauthorization cannot be performed.
IConferenceManager
These functions are called at the IConferenceManager interface level, which is obtained by calling the TrueConfSDK.getConferenceManager() function.
isInConference
Checking conference participation.
Return value (boolean) – true if the client is in a conference, false if the client is not in a conference.
callTo
Call the specified subscriber.
Parameters:
user– TrueConf ID of the called subscriber (String).
Return value (boolean) – true if the call is sent to the server, false if the call cannot be made.
joinConf
Connecting to a group conference.
Parameters:
conf_ID– conference identifier (String).
Return value (boolean) – true if the call is sent to the server, false if the call cannot be made.
hangup
Ending the current call or conference.
Parameters:
forAll(optional) – in the case of a conference, indicates whether it should be ended for all participants if authorized (boolean). Default istrue.
Return value (boolean) – true if the call can be terminated, false if the call cannot be terminated (usually due to an incorrect state).
acceptCall
Answering an incoming call.
Parameters:
accept– accept or decline a call (boolean).
Return value (boolean) – true if a response to the request can be made, false if a response is not possible.
acceptRecord
Response to an incoming video recording request.
Parameters:
accept– accept or decline a video recording request (boolean);userID– the TrueConf ID of the user to whom the request response is given (String).
returnToCall
Return to conference activity.
Parameters:
currentContext– current context (Context).
sendPincode
Sending a PIN code for accessing a PIN-protected conference.
Parameters:
confId– Conference ID (String);pin- PIN code (String).
IVideoDeviceController
These functions are called at the IVideoDeviceController interface level, which is obtained by calling the TrueConfSDK.getVideoDeviceController() function.
isCameraMuted
Checking the camera status.
Return value (boolean) – true when the camera is off, false when the camera is on.
muteCamera
Camera status change.
Parameters:
mute– the state to set the camera to:true– camera off,false– camera on (boolean).
isCameraEnabledByDefault
Returns the default camera status (boolean)
setDefaultCameraEnabled
Set the default camera status.
Parameters:
isEnabled–trueenables video capture,falsedisables it (boolean).
IAudioDeviceController
These functions are called at the IAudioDeviceController interface level, which is obtained by calling the TrueConfSDK.getAudioDeviceController() function.
muteMicrophone
Changing the microphone status.
Parameters:
mute– the state to set the microphone to:true– microphone is off,false– microphone is on (boolean).
isMicrophoneMuted
Checking the microphone status.
Return value (boolean) – true if the microphone is muted, false if the microphone is unmuted.
muteSpeaker
Enables or disables sound from the speakers.
Parameters:
mute–truemutes the sound,falseunmutes it (boolean).
requestAudioState
Request the current status of audio devices. In turn, it calls the onAudioDeviceResponse method from AudioDeviceCallback.
isMicEnabledByDefault
Returns the default microphone status (boolean).
setDefaultMicEnabled
Setting the default microphone status.
Parameters:
isEnabled–trueenables audio capture,falsedisables it (boolean).
isSpeakerEnabledByDefault
Returns the default speaker status (boolean).
setDefaultSpeakerEnabled
Setting the default speaker state.
Parameters:
isEnabled–trueenables audio output,falsedisables it (boolean).
setDefaultAudioDevice
Setting the default audio output device.
Parameters:
audioDeviceInfo– output device (AudioDeviceInfo).
changeAudioDevice
Changes the audio output device during a conference.
Parameters:
audioDeviceInfo– output device (AudioDeviceInfo).
IChatManager
These functions are invoked at the IChatManager interface level, which is obtained by calling the TrueConfSDK.getChatManager() function.
sendChatMessage
Sending a text message.
Parameters:
toID– TrueConf ID of the user to whom the message is sent (it is recommended to use the full ID formatuser@server.name) (String). To send a message to the chat of the current group conference, this parameter should be left empty.text– message text (String).
Return value (boolean) – true when the message is sent to the server, false if the message fails to send due to lack of server connection.
IContactsManager
These functions are called at the IContactsManager interface level, which is obtained by calling the TrueConfSDK.getContactsManager() function.
getMyId
Obtaining your personal ID.
Return value (String) – the identifier of the current user in the system.
getMyName
Retrieving your own display name for the interface.
Return value (String) – the name of the current user.
getUserStatus
Fetching the status of another user. If the status is known, it is returned immediately. If not, the status is requested from the server, and the client subscribes to notifications about its changes.
Parameters:
user– TrueConf ID of the user whose status is being requested (String).
Return value (PresenceStatus) – the current status of the user.
getUsers
Retrieving a list of contacts from the address book of the user authorized in the SDK. It returns an array of ContactInfo objects, with each object containing a userId (String, TrueConf ID of the user) and their current status (PresenceStatus).
IVisicallManager
These functions are called at the IVisicallManager interface level, which is obtained by calling the TrueConfSDK.getVisicallManager() function.
parseProtocolLink
The function receives a command in the form of a string, indicating which account to use for authorization and which call to make. It then automatically performs all these operations. If execution is halted at any stage.
Parameters:
cmd– the string being processed (String).
IExtraButtonController
These functions are called at the IExtraButtonController interface level, which is obtained by calling the TrueConfSDK.getExtraButtonController() function.
setNewExtraButtons
Add additional buttons to the conference control panel. The buttons will be added in the order they appear in the array that is passed, into the list that opens when tapping the "ellipsis" button (the right button on the panel). See Example 5.
Parameters:
btnsis an array of objects of typeTCExtraButton.
ICallScreenController
These functions are called at the ICallScreenController interface level, which is obtained by calling the TrueConfSDK.getCallScreenController() function.
setReciveCallFragment
Override the incoming call screen.
Parameters:
fragment– custom fragment of an incoming call (Fragment)
setPlaceCallFragment
Override the outgoing call screen.
Parameters:
fragment– custom fragment of an outgoing call (Fragment)
setConferenceFragment
Override conference screen.
Parameters:
fragment– custom conference fragment (Fragment)
