# .NET Functions
Functions for .NET are divided into platform-dependent, which are available separately for each platform (Android, iOS), as well as common functions that are identical for each platform.
# Android Functions
Below is a list of functions that are used exclusively for Android development.
# Init
Function to initialize the Android SDK object with platform-specific parameters.
Parameters:
activity
– the current Activity for initializing all activities and services (Activity
).
# AddCustomButtons
The function of adding additional custom buttons to the meeting control panel.
Parameters:
extraButtons
– an array of buttons of typeTCExtraButton
.
# GetTrueConfAppContext
Retrieving context from Android SDK.
Return value: application context (Context
).
# iOS Functions
The following is a list of functions used exclusively for iOS development.
# Init
Function for initializing the iOS SDK object with platform-specific parameters.
Parameters:
uiApplication
– the currentUIApplication
for working with application controllers.
# AddCustomButtons
The function of adding additional custom buttons to the meeting control panel.
Parameters:
extraButtons
– an array of buttons of typeTCSDKExtraButton
.
# PresentViewController
Displaying a new UIViewController over the conference window.
Parameters:
controller
– a controller for overlaying the conference window (UIViewController
);animated
– animation of the controller appearance (bool
);sender
– parent controller (NSObject
);completionHandler
– the action to be performed after the controller appears (Action
).
# Common Features
Below is a list of common features that are identical across all platforms.
# Start
Launching SDK after initialization.
Parameters:
serverIP
– the server and port to connect to in the format<server address>:<server port>
(NSString
);
# Stop
Stopping the SDK instance and releasing resources.
# 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 (bool
);enableAutoLogin
– whether to automatically authenticate the user with this ID upon re-launch (bool
).
Return value (bool
) – true
if the authorization request is sent to the server, false
if the authorization cannot be performed.
# Logout
Deauthorization (log out) of an account without disconnecting the SDK from the video conferencing server.
Return value (bool
) – true
if the deauthorization request was sent to the server, false
if deauthorization cannot be performed.
# CallTo
Call to the specified subscriber.
Parameters:
user
– TrueConf ID of the called party (string).
The return value (bool
) is true
if the call is sent to the server, false
if the call cannot be made.
# JoinConf
Joining a group conference.
Parameters:
conferenceId
– conference identifier (string
).
The return value (bool
) 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 (bool
). 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 (bool
).
Return value (bool
) – true
if a response to the request can be made, false
if a response is not possible.
# 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).
# ScheduleLoginAs
Obtaining a list of operations that need to be executed sequentially, including the server to connect to, account credentials, and the recipient's call details. This is equivalent to the function parseProtocolLink
, where parameters are not passed as a protocol string but individually. 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 (bool
);callToUser
– identifier of the called user (string
);autoClose
– indicates whether to close the session with the server after completing a call or interrupting execution (bool
);loginTemp
– indicates a temporary login. It means that the client should be logged out after the call (bool
);loginForce
– forced login. Authentication will occur even if the client is already authenticated on the server (bool
);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 thatcallToUser
is the name of a conference, not a user name. If this parameter is incorrect, the call to the user or connection to the conference will not be successful (bool
).
# MuteMicrophone
Changing the microphone status.
Parameters:
mute
– the state to set the microphone:true
– microphone is off,false
– microphone is on (boolean).
# MuteCamera
Camera status change.
Parameters:
mute
– the state to set the camera to:true
– camera off,false
– camera on (bool
).
# GetMyId
Getting your own ID.
Return value (string
): the identifier of the current user in the system.
# GetMyName
Obtaining a custom name for display in the interface.
Return value (string
): the name of the current user.
# IsStarted
Check the operational status of the SDK instance (bool
).
# IsConnectedToServer
Checking the connection to the server.
Return value (bool
) - true
if there is a connection to the server, false
if there is no connection.
# IsLoggedIn
Checking authorization status.
Return value (bool
) – true
, the user is authorized on the server; false
– the user is not authorized.
# IsInConference
Checking conference presence.
Return value (bool
) – true
, the client is in a conference; false
, the client is not in a conference.
# 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 (TUserPresStatus
) – the current status of the user.
# IsMicrophoneMuted
Microphone status check.
Return value (bool
) – true
when the camera is off, false
when the camera is on.
# IsCameraMuted
Camera status check.
Return value (bool
) – true
when the camera is off, false
when the camera is on.
# AcceptRecord
Response to an incoming video recording request.
Parameters:
accept
– accept or decline a video recording request (bool
);userID
– TrueConf ID of the user to whom the response to the request is given (string
).
# SendChatMessage
Sending a text message.
Parameters:
userID
– the TrueConf ID of the user to whom the message is being sent (it is recommended to use the full ID in the form ofuser@server.name
) (string
). To send a message in the chat of the current group conference, this parameter should be left empty.message
– message text (string
).
Return value (boolean) – true
if the message is sent to the server, false
if the message fails to send due to lack of server connection.