Mention
To Mention user along with a message in a group, you can use mentionedUsersIds param provided to all kinds of messages such as Text, Image and video
Text message#
To send your text message, you need to pass the TextMessage object as an argument to the parameter in the sendTextMessage() method.
| Argument | Type | Description |
|---|---|---|
| MESSAGE_PARAMS | TextMessage | Object to hold the parameters of the text message |
| CALLBACK | FlySendMessageListener | callback to observe the action status |
Image message#
To send your image message, you need to pass the FileMessage object with FileMessageParams set as an argument to the parameter in the sendMediaFileMessage() method.
| Argument | Type | Description |
|---|---|---|
| MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the image message |
| CALLBACK | FlySendMessageListener | callback to observe the action status |
To get the metadata of an image file for sending images make use of the utility methods
MediaUtils.getAssetsImageInfo()andMediaUtils.compressImage()
caution
If Image attachment feature unavailable for your plan then it will throw 403 exception.
Video message#
To send your video message, you need to pass the FileMessage object with FileMessageParams set as an argument to the parameter in the sendMediaFileMessage() method.
| Argument | Type | Description |
|---|---|---|
| MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the video message |
| LISTENER | FlySendMessageListener | callback to observe the action status |
To get the metadata of a video file for sending videos make use of the utility methods
MediaUtils.processVideo()andMediaUtils.compressVideo()
caution
If Video attachment feature unavailable for your plan then it will throw 403 exception.
Send Reply message#
To 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()
| Argument | Type | Description |
|---|---|---|
| MESSAGE_PARAMS | TextMessage | Object to hold the parameters of the text message |
| CALLBACK | FlySendMessageListener | callback to observe the action status |
Receive Message#
To receive a mention related message from another user in a group 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.
info
To learn more on message listener callbacks, see the Message Events Delegate.