2. SDK Features
Login management
Login
Used to login Tio chat by FQA Token
tokenFQA
String
Token FQA
When successful login, the SDK returns a model user information which leads to the
onSuccess()
callback. Handling login successfully here.When login fails, it will be processed at callback
onFail()
.
isLoggedIn
Used to determine whether to log in
Returns the user's logged in status,
true
is logged in,false
is not logged in
Logout
Used to logout Tio chat
When successful logout, the SDK returns a event which leads to the
onSuccess()
callback. Handling logout successfully here.When logout fails, it will be processed at callback
onFail()
.
Conversation management
fetchServerSessions
Used to chat list synchronization from local or server
fetchLocal
Boolean
Mode fetch data: true
when fetch from local, false
when fetch from server
When successful fetch data, the SDK returns a list chat which leads to the
onSuccess()
callback. Handling fetch data successfully here.When fetch data fails, it will be processed at callback
onFail()
.
deleteSession
Used to delete session chat
sessionId
String
Id session chat
isDeleteChatRecord
Boolean
Mode delete session: true
when delete session and delete chat history, false
when delete session and without deleting chat history
When successful delete, the SDK returns a event which leads to the
onSuccess()
callback. Handling delete successfully here.When delete fails, it will be processed at callback
onFail()
.
complaintSession
Used to complaint about session chat
sessionId
String
Id session chat
When successful complaint, the SDK returns a event which leads to the
onSuccess()
callback. Handling complaint successfully here.When complaint fails, it will be processed at callback
onFail()
.
clearAllMessagesInSession
Used to delete chat history
sessionId
String
Id session chat
When successful delete, the SDK returns a model status which leads to the
onSuccess()
callback. Handling delete successfully here.When delete fails, it will be processed at callback
onFail()
.
topSession
Used to pin/unpin session
sessionId
String
Id session chat
enable
Boolean
Mode pin session: true
when pin session, false
when unpin session
When successful pin/unpin, the SDK returns a model status which leads to the
onSuccess()
callback. Handling pin/unpin successfully here.When pin/unpin fails, it will be processed at callback
onFail()
.
fetchSessionInfoWithSessionId
Used to send request get chat information
sessionId
String
Id session chat
Handling history chat on chat callback
onGetChatInfo
.
enterConversationWithSessionId
Used to send operation enter room
leaveConversationWithSessionId
Used to send operation leave room
registerConversationCallback
Used to register callback chat list synchronization
Room management
createRoomName
Used to create public room
roomName
String
Room name
intro
String
Intro room
uidList
String
list uid members in room
When successful create room, the SDK returns a model room response which leads to the
onSuccess()
callback. Handling created room data successfully here.When create room fails, it will be processed at callback
onFail()
.
activeRoom
Used to active room after create room
roomId
String
Id room created
When successful active room, the SDK returns a model active response which leads to the
onSuccess()
callback. Handling active room data successfully here.When active room fails, it will be processed at callback
onFail()
.
exitFromRoom
Used to leave room
roomId
String
Id room
When successful leave room, the SDK returns status which leads to the
onSuccess()
callback. Handling leave room successfully here.When leave room fails, it will be processed at callback
onFail()
.
deleteRoom
Used to disband room
roomId
String
Id room
When successful delete room, the SDK returns a model delete response which leads to the
onSuccess()
callback. Handling delete room successfully here.When delete room fails, it will be processed at callback
onFail()
.
transferRoom
Used to transfer room
roomId
String
Id room created
toUser
String
Uid new owner
When successful transfer room, the SDK returns a model change owner response which leads to the
onSuccess()
callback. Handling transfer room data successfully here.When transfer room fails, it will be processed at callback
onFail()
.
answerMessageNotificationForUid
Used to setting do not disturb room
roomId
String
Id room created
enable
Boolean
Mode DND room: true
when enable DND, false
when disable DND
When successful setting DND, the SDK returns status which leads to the
onSuccess()
callback. Handling setting DND successfully here.When setting DND fails, it will be processed at callback
onFail()
.
fetchRoomInfoWithRoomId
Used to get room information
roomId
String
Id room
When successful get information, the SDK returns a model information room response which leads to the
onSuccess()
callback. Handling get information successfully here.When get information fails, it will be processed at callback
onFail()
.
fetchMembersInRoom
Used to get room's list member
roomId
String
Id room
searchKey
String
Key search member in room
pageNumber
Int
Page number list members
When successful get list members, the SDK returns a list members in room response which leads to the
onSuccess()
callback. Handling get list members successfully here.When get list members fails, it will be processed at callback
onFail()
.
addUser
Used to invite new user into room
roomId
String
Id room
uidList
List
list uid members want invite to room
When successful add member, the SDK returns status which leads to the
onSuccess()
callback. Handling add member successfully here.When add member fails, it will be processed at callback
onFail()
.
removeUser
Used to remove user from room
roomId
String
Id room
uidList
List
list uid members want remove from room
When successful remove member, the SDK returns status which leads to the
onSuccess()
callback. Handling remove member successfully here.When remove member fails, it will be processed at callback
onFail()
.
updateUserNick
Used to change user's nick name in room
nickName
String
New user's nick name
roomId
String
Id room
When successful update nick name, the SDK returns status which leads to the
onSuccess()
callback. Handling update nick name successfully here.When update nick name fails, it will be processed at callback
onFail()
.
updateRoomName
Used to update room name
newName
String
New room's name
roomId
String
Id room
When successful update room name, the SDK returns status which leads to the
onSuccess()
callback. Handling update room name successfully here.When update room name fails, it will be processed at callback
onFail()
.
updateRoomNotice
Used to update room notice
newNotice
String
New room's notice
roomId
String
Id room
When successful update room notice, the SDK returns event which leads to the
onSuccess()
callback. Handling update room notice successfully here.When update room notice fails, it will be processed at callback
onFail()
.
updateRoomIntro
Used to update room intro
newIntro
String
New room's intro
roomId
String
Id room
When successful update room intro, the SDK returns event which leads to the
onSuccess()
callback. Handling update room intro successfully here.When update room intro fails, it will be processed at callback
onFail()
.
fetchAllRooms
Used to get list public room
When successful get list public room, the SDK returns a list public room which leads to the
onSuccess()
callback. Handling get list public room successfully here.When get list public room fails, it will be processed at callback
onFail()
.
forbiddenAllRoom
Used to forbidden all user in room
roomId
String
Id room
operation
OperationCode
Operation forbidden: OperationCode.ON
when mute, OperationCode.OFF
when cancel mute
When successful forbidden user, the SDK returns a model forbidden response which leads to the
onSuccess()
callback. Handling forbidden user successfully here.When forbidden user fails, it will be processed at callback
onFail()
.
forbiddenUser
Used to forbidden user in room
modeForbidden
ForbiddenMode
Mode forbidden: ForbiddenMode.USER_DURATION
when user duration ban, ForbiddenMode.USER_LONGTIME
when The user is banned for a long time
duration
Long
User duration is required for muting operation. Unit: second
uid
String
Uid member forbidden in room
roomId
String
Id room
operation
OperationCode
Operation forbidden: OperationCode.ON
when mute, OperationCode.OFF
when cancel mute
When successful forbidden user, the SDK returns a model forbidden response which leads to the
onSuccess()
callback. Handling forbidden user successfully here.When forbidden user fails, it will be processed at callback
onFail()
.
fetchForbiddenUserListInRoomId
Used to get list user was forbidden in room
roomId
String
Id room
searchKey
String
Key search member was forbidden in room
pageNumber
Int
Page number list member was forbidden
When successful get list was forbidden, the SDK returns a model include list member was forbidden in room response which leads to the
onSuccess()
callback. Handling get list member was forbidden successfully here.When get list member was forbidden fails, it will be processed at callback
onFail()
.
checkStatusForUser
Used to check status user in room
uid
String
Uid member in room
roomId
String
Id room
When successful get status, the SDK returns a model status user in room response which leads to the
onSuccess()
callback. Handling get status successfully here.When get status fails, it will be processed at callback
onFail()
.
updateJoiningPermissionForRoom
Used to modify apply new member in room
roomId
String
Id room
enable
Boolean
Mode joining permission: true
when enable permission, false
when disable permission
When successful update, the SDK returns status which leads to the
onSuccess()
callback. Handling update successfully here.When update fails, it will be processed at callback
onFail()
.
updateReviewingPermissionForRoom
Used to modify review before invite new member
roomId
String
Id room
enable
Boolean
Mode joining permission: true
when enable permission, false
when disable permission
When successful update, the SDK returns event which leads to the
onSuccess()
callback. Handling update successfully here.When update fails, it will be processed at callback
onFail()
.
updateAddingFriendPermissionInRoom
Used to modify invite friend into room
roomId
String
Id room
enable
Boolean
Mode joining permission: true
when enable permission, false
when disable permission
When successful update, the SDK returns event which leads to the
onSuccess()
callback. Handling update successfully here.When update fails, it will be processed at callback
onFail()
.
searchFriends
Used to get list of friends that can be invite to the room
roomId
String
Id room
searchKey
String
Key search friend
When successful get list friend, the SDK returns a list of friends response which leads to the
onSuccess()
callback. Handling get list friend successfully here.When get list friend fails, it will be processed at callback
onFail()
.
fetchMessagesHistory
Used to get history chat in room
startMid
String
The starting message id. If startMid = null
sdk will take from the latest message
Handling history chat on chat callback
onFetchMessagesHistory
.
registerTioLinkStatus
Used to register receive status connect
registerRoomCallback
Used to register receive event from room
Chat management
sendMessage
Used to send message into room
content
String
Content message
When successful send message the SDk returns
true
, opposite returnsfalse
revokeMessage
Used to revoke message in room
sessionId
String
Session id
mid
String
Id message in room
When successful revoke message, the SDK returns a model status which leads to the
onSuccess()
callback. Handling revoke message successfully here.When revoke message fails, it will be processed at callback
onFail()
.
deleteMessage
Used to delete message in room
sessionId
String
Session id
mid
String
Id message in room
When successful delete message, the SDK returns a model status which leads to the
onSuccess()
callback. Handling delete message successfully here.When delete message fails, it will be processed at callback
onFail()
.
reportMessage
Used to report message in room
sessionId
String
Session id
mid
String
Id message in room
When successful report message, the SDK returns a model status which leads to the
onSuccess()
callback. Handling report message successfully here.When report message fails, it will be processed at callback
onFail()
.
registerChatCallback
Used to register callback chat in room
detachTioSdk
Used to unregister all callback and free up sdk resources
Last updated