# Android Functions
Below is a list of features used in development with the Android Studio IDE.
# SDK Instance Functions
They are invoked at the instance level of TrueConf Mobile SDK, obtained via the TrueConfSDK.getInstance()
function. For example, TrueConfSDK.getInstance().registerApp(this)
.
# registerApp
Registers a subclass of Application
. This method must be called before start
.
Parameters:
application
–Application
class (Class
).
# addTrueconfListener
Connecting a participant.
Parameters:
listener
– listener class (TrueconfListener
).
# removeTrueconfListener
Muting a participant.
Parameters:
listener
– listener class (TrueconfListener
).
# setFallbackActivity
Records the Activity
class to return to upon call completion. This method must be called without fail.
Parameters:
activity
– classActivity
(Class
).
# start
Launching the SDK.
Parameters:
serverList
– list of servers (String
) (optional parameter);checkPermissions
– whether to check permissions when necessary (boolean
).
# stop
Stopping the SDK instance and releasing resources.
# isStarted
Checking the operational status of the SDK instance, result type boolean
.
# IServerManager
These functions are invoked at the IServerManager
interface level, which is obtained by calling the TrueConfSDK.getServerManager()
function.
# isConnectedToServer
Checking the connection to the server.
Return value (boolean) - true
if there is a connection to the server, false
if there is no connection.
# isLoggedIn
Checking authorization status.
Return value (boolean) – true
, the user is authorized on the server; false
– the user is not authorized.
# loginAs
Authorization as a specific user with the specified parameters on the server.
Parameters:
user
- user ID (string);pwd
– password (string);encryptPassword
–true
if the password is transmitted in plain text (and the SDK needs to encrypt it),false
if it is already encrypted (boolean);enableAutoLogin
– whether to automatically authenticate the user with this ID upon re-launch (boolean).
Return value (boolean) – true
if the authorization request is sent to the server, false
if the authorization cannot be performed.
# scheduleLoginAs
Retrieving a list of operations that must be performed sequentially, including the server to connect to, account credentials, and the recipient's call address. This is equivalent to the function parseProtocolLink
, where parameters are not passed as a protocol string but separately. String parameters may be empty.
Parameters:
login
– user ID (string);pwd
– password (string);encryptPassword
–true
if the password is transmitted in plain text (and the SDK needs to encrypt it),false
if it is already encrypted (boolean);callToUser
– identifier of the called user (string);autoClose
– indicates whether to close the session with the server after completing a call or interrupting execution (boolean);loginTemp
– indicates a temporary login. It means that the client should be logged out after the call (boolean);loginForce
– forced login. Authentication will occur even if the client is already authenticated on the server (boolean);domain
- the domain in which the automatic server search will be performed (string);serversList
– a list of servers to connect to (string);isPublic
– a parameter indicating that callToUser is a conference name, not a username. If this parameter is incorrect, the call to the user or the connection to the conference will not be executed (boolean).
# logout
Deauthorization (log out) of 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 presence.
Return value (boolean) – true
, the client is in a conference; false
, the client is not in a conference.
# callTo
Call the specified subscriber.
Parameters:
user
– TrueConf ID of the called party (string).
The return value (boolean) is true
if the call is sent to the server, false
if the call cannot be made.
# joinConf
Joining a group conference.
Parameters:
conf_ID
– conference ID (string).
The return value (boolean) is 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, determines whether it should be ended for all participants if authorized (boolean). The default istrue
.
Return value (boolean) — true
if the call can be ended, false
if the call cannot be ended (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
– TrueConf ID of the user to whom the response to the request is given (string).
# returnToCall
Return to conference activity.
Parameters:
currentContext
– current context (Context
).
# sendPincode
Sending a PIN code for access to 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
Camera status check.
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
Setting the default camera state.
Parameters:
isEnabled
–true
enables video capture,false
disables 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:true
– microphone is off,false
– microphone is on (boolean).
# isMicrophoneMuted
Microphone status check.
Return value (Boolean) – true
when the microphone is muted, false
– when the microphone is unmuted.
# muteSpeaker
Turns the speaker sound on or off.
Parameters:
mute
–true
mutes the sound,false
unmutes (boolean
).
# requestAudioState
Requests the current status of audio devices. In turn, calls the onAudioDeviceResponse method from AudioDeviceCallback.
# isMicEnabledByDefault
Returns the default microphone status (boolean
).
# setDefaultMicEnabled
Setting the default microphone status.
Parameters:
isEnabled
–true
enables audio capture,false
disables it (boolean
).
# isSpeakerEnabledByDefault
Returns the default speaker status (boolean
).
# setDefaultSpeakerEnabled
Setting the default speaker status.
Parameters:
isEnabled
–true
enables audio output,false
disables it (boolean
).
# setDefaultAudioDevice
Setting the default audio output device.
Parameters:
audioDeviceInfo
– output device (AudioDeviceInfo
).
# changeAudioDevice
Changes the audio output device during the conference.
Parameters:
audioDeviceInfo
– output device (AudioDeviceInfo
).
# IChatManager
These functions are called at the IChatManager
interface level, which is obtained by calling the TrueConfSDK.getChatManager()
function.
# sendChatMessage
Sending a text message.
Parameters:
toID
– (string) the TrueConf ID of the user to whom the message is being sent (it is recommended to use the full ID in the formatuser@server.name
). To send a message to the chat of the current group conference, this parameter should be left empty.text
– (string) message text.
# IContactsManager
These functions are invoked at the IContactsManager
interface level, which is obtained by calling the TrueConfSDK.getContactsManager()
function.
# getMyId
Getting your own ID.
Return value (string) – the identifier of the current user in the system. If the user is not authorized on the server, Nil is returned.
# getMyName
Obtaining a custom name for display in the interface.
Return value (string) – the name of the current user. Contains Nil if the user is not authenticated on the server, or a string equal to the user ID if the user does not have a specific name.
# getUserStatus
Retrieving another user's status. If the status is known, it is returned immediately. If not, the status is requested from the server, and the client subscribes to receive notifications of any changes.
Parameters:
user
– the TrueConf ID of the user whose status is being requested (string).
Return value (UserPresStatus
) – the current status of the user.
# getUsers
Retrieving the list of contacts from the address book of the user authorized in the SDK. Returns an array of ContactInfo
objects, each containing the userId
(String, TrueConf ID of the user) and their current status (PresenceStatus
).
# IVisicallManager
These functions are invoked at the IVisicallManager
interface level, which is obtained by calling the TrueConfSDK.getVisicallManager()
function.
# parseProtocolLink
The function receives a command as a string, containing instructions on which account to authenticate and which call to make. It then automatically executes all these operations. If execution of the command 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 passed array to the list that opens when tapping the "ellipsis" button (the right button on the panel). See Example 5.
Parameters:
btns
– an array of objects of typeTCExtraButton
.
# ICallScreenController
These functions are invoked 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 the conference screen.
Parameters:
fragment
– custom conference fragment (Fragment
)