Topic Based Chat
Topic based chat lets you to group the chat by topic. You can create the topic , send all types of messages with topic information and thus you can receive the messages by topic.
#
Create TopicYou can use the below given method to create a new topic.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
TOPIC_NAME | String | Name of the topic (cannot be null or empty) |
META_DATA | List<MetaData> | META_DATA is an optional parameter to provide additional information about the topic. You can pass it as a List of MetaData Maximum Size is 3 |
#
Get TopicsYou can use the below given method to get the topics details.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
TOPIC_IDS | ArrayList<String> | ArrayList of topic ids |
#
Send MessageTo send the message to the user, use the below methods. Different messages such as text, image, audio, video & document type messages can be sent using the below methods.
#
Text messageTo send your text message, you need to pass the TextMessage
object as an argument to the parameter in the sendTextMessage()
method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | TextMessage | Object to hold the parameters of the text message |
CALLBACK | SendMessageCallback | callback to observe the action status |
#
Image messageTo send your image message, you need to pass the FileMessage
object as an argument to the parameter in the sendMediaFileMessage()
method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the image message |
CALLBACK | SendMessageCallback | callback to observe the action status |
Note : In ChatManager
.setMediaFolderName
should be defined to set your own local path to store app media files.
caution
If Image attachment feature unavailable for your plan then it will throw 403 exception.
caution
FlyMessenger.sendFileMessage()
method was deprecated and will be removed in the future release. migrate to FlyMessenger.sendMediaFileMessage()
method to send Image files.
#
Image message with urlTo send your image message, you need to pass the FileMessage
object as an argument to the parameter in the sendMediaFileMessage()
method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the image message |
CALLBACK | SendMessageCallback | callback to observe the action status |
caution
If Image attachment feature unavailable for your plan then it will throw 403 exception.
caution
FlyMessenger.sendFileMessage()
method was deprecated and will be removed in the future release. migrate to FlyMessenger.sendMediaFileMessage()
method to send Image files.
#
Video messageTo send your video message, you need to pass the FileMessage
object as an argument to the parameter in the sendMediaFileMessage()
method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the video message |
CALLBACK | SendMessageCallback | callback to observe the action status |
Note : In ChatManager
.setMediaFolderName
should be defined to set your own local path to store app media files.
caution
If Video attachment feature unavailable for your plan then it will throw 403 exception.
caution
FlyMessenger.sendFileMessage()
method was deprecated and will be removed in the future release. migrate to FlyMessenger.sendMediaFileMessage()
method to send Video files.
#
Video message with urlTo send your video message, you need to pass the FileMessage
object as an argument to the parameter in the sendMediaFileMessage()
method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the video message |
CALLBACK | SendMessageCallback | callback to observe the action status |
caution
If Video attachment feature unavailable for your plan then it will throw 403 exception.
caution
FlyMessenger.sendFileMessage()
method was deprecated and will be removed in the future release. migrate to FlyMessenger.sendMediaFileMessage()
method to send Video files.
#
Audio messageTo send your audio message, you need to pass the FileMessage
object as an argument to the parameter in the sendMediaFileMessage()
method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the audio message |
CALLBACK | SendMessageCallback | callback to observe the action status |
Note : In ChatManager
.setMediaFolderName
should be defined to set your own local path to store app media files.
caution
If Audio attachment feature unavailable for your plan then it will throw 403 exception.
caution
FlyMessenger.sendFileMessage()
method was deprecated and will be removed in the future release. migrate to FlyMessenger.sendMediaFileMessage()
method to send Audio files.
#
Audio message with urlTo send your audio message, you need to pass the FileMessage
object as an argument to the parameter in the sendMediaFileMessage()
method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the audio message |
CALLBACK | SendMessageCallback | callback to observe the action status |
caution
If Audio attachment feature unavailable for your plan then it will throw 403 exception.
caution
FlyMessenger.sendFileMessage()
method was deprecated and will be removed in the future release. migrate to FlyMessenger.sendMediaFileMessage()
method to send Audio files.
#
Document messageTo send your document message, you need to pass the FileMessage
object as an argument to the parameter in the sendMediaFileMessage()
method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the document message |
CALLBACK | SendMessageCallback | callback to observe the action status |
Note : In ChatManager
.setMediaFolderName
should be defined to set your own local path to store app media files.
caution
If Document attachment feature unavailable for your plan then it will throw 403 exception.
caution
FlyMessenger.sendFileMessage()
method was deprecated and will be removed in the future release. migrate to FlyMessenger.sendMediaFileMessage()
method to send Document files.
#
Document message with urlTo send your document message, you need to pass the FileMessage
object as an argument to the parameter in the sendMediaFileMessage()
method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the document message |
CALLBACK | SendMessageCallback | callback to observe the action status |
caution
If Document attachment feature unavailable for your plan then it will throw 403 exception.
caution
FlyMessenger.sendFileMessage()
method was deprecated and will be removed in the future release. migrate to FlyMessenger.sendMediaFileMessage()
method to send Document files.
#
Location messageTo send your location message, you need to pass the FileMessage
object as an argument to the parameter in the sendMediaFileMessage()
method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the location message |
CALLBACK | SendMessageCallback | callback to observe the action status |
caution
If Location attachment feature unavailable for your plan then it will throw 403 exception.
caution
FlyMessenger.sendFileMessage()
method was deprecated and will be removed in the future release. migrate to FlyMessenger.sendMediaFileMessage()
method to send Location message.
#
Contact messageTo send your contact message, you need to pass the FileMessage
object as an argument to the parameter in the sendMediaFileMessage()
method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the contact message |
CALLBACK | SendMessageCallback | callback to observe the action status |
caution
If Contact attachment feature unavailable for your plan then it will throw 403 exception.
caution
FlyMessenger.sendFileMessage()
method was deprecated and will be removed in the future release. migrate to FlyMessenger.sendMediaFileMessage()
method to send Contact message.
#
Meet messageA meet message
typically refers to a message or communication related to scheduling or planning a meeting. These messages can include information about the Scheduled date,time and meet link.
#
Create Meet linkBefore you send the meet message, you need to create the meet link using the createMeetLink method. Once the meet link has been created successfully, you can send the Meet message.
caution
If Group call feature is unavailable for your plan, then it will throw 403 exception
- Java
- Kotlin
To send your Meet message, you need to pass the MeetMessage
object as an argument to the parameter in the sendMeetMessage()
method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | MeetMessage | Object to hold the parameters of the meet message |
CALLBACK | SendMessageCallback | callback to observe the action status |
#
Send Reply messageTo send reply message to the original message, you need to pass the additional parameter original message-id in replyMessageId
.TextMessage
object as an argument to the parameter in the sendTextMessage()
method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | TextMessage | Object to hold the parameters of the text message |
CALLBACK | SendMessageCallback | callback to observe the action status |
#
Receive MessageTo receive a Topic related message from another user you must implement the messageListener function. It’s a function that will be triggered whenever you receive a new message or related event in the chat.
- java
- Kotlin
info
To learn more on message listener callbacks, see the MessageEventsCallbacks
.
#
Get Chats By TopicIdTo get all the list of TopicId related chats, send a request to the server as described below.
#
InitializationFirst, create a TopicChatListParams
instance to set the topicId and recent chat list limits based on the inputs.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
LIMIT | Int | No of topic based chats will be fetched for each request default 40 |
TOPIC_ID | String | Particular topic based chats will be fetched |
Second, create a TopicChatListBuilder
instance.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
TOPIC_CHAT_LIST_PARAMS | TopicChatListParams | Instance of 'TopicChatListParams' |
#
Load Initial Topic Based Chat ListTo fetch initial Topic based recent chat list, call the below method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
CALLBACK | FlyCallback | 'FlyCallback' implemented as lambda expression |
#
Load Next Set of Topic based Recent Chat ListTo fetch next set of topic based recent chat list, call the below method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
CALLBACK | FlyCallback | 'FlyCallback' implemented as lambda expression |
#
Get messagesTo get the chat and media messages, use the below methods
#
Get Chat Messages#
InitializationFirst, create a FetchMessageListParams
instance. Here, you need to set the message filter to determine the message order and the starting point of the message list in the chat view.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
JID | String | Jid of the user/group |
MESSAGE_ID | String | Message id of the starting point optional |
MESSAGE_TIME | String | Message time of the starting point optional |
INCLUSIVE | boolean | If true starting point message will included in message list default false |
ASCENDING_ORDER | boolean | If true message list will be returned ascendingOrder by message time default false |
LIMIT | int | No of messages will be fetched for each request default 50 |
TOPIC_ID | String | Topic Id to be fetched |
Second, create a FetchMessageListQuery
instance.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
MESSAGE_LIST_PARAM | FetchMessageListParams | Insatance of 'FetchMessageListParams' |
#
Load Initial MessagesTo fetch initial conversations between you and a single chat user or group, call the below method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
CALLBACK | FlyCallback | 'FlyCallback' implemented as lambda expression |
#
Load Previous MessagesTo fetch previous conversations between you and a single chat user or group, call the below method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
CALLBACK | FlyCallback | 'FlyCallback' implemented as lambda expression |
#
Load Next MessagesTo fetch next conversations between you and a single chat user or group, call the below method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
CALLBACK | FlyCallback | 'FlyCallback' implemented as lambda expression |
#
Check Previous Set of Messages Available or notTo check previous set of conversations available or not, call the below method.
- Java
- Kotlin
#
Check Next Set of Messages AvailableTo check next set of conversations available or not, call the below method.
- Java
- Kotlin
#
Check Message Fetching InProgressTo check conversations fetching in progress or not, call the below method.
- Java
- Kotlin
#
Get media messagesIf you want to get the media messages for a user/group, you can utilise the below method.
- Java
- Kotlin
Argument | Type | Description |
---|---|---|
JID | String | jid of the chat user |
info
Above methods fetch media messages which are successfully sent and received.
caution
If media message feature unavailable for your plan then it will throw 403 exception.