Message By MetaData
To send custom data along with a message, you can use metaData
param provided to all kinds of messages such as Text, Image, audio, video & document.
#
Text messageTo 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 messageTo send your image message, you need to pass the FileMessage
object with FileMessageParams
set as an argument to the parameter in the sendFileMessage()
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.
#
Audio messageTo send your audio message, you need to pass the FileMessage
object with FileMessageParams
set as an argument to the parameter in the sendFileMessage()
method.
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the audio message |
listener | FlySendMessageListener | callback to observe the action status |
To get the metadata of an audio file for sending audio make use of the utility method
MediaUtils.processAudio()
caution
If Audio attachment feature unavailable for your plan then it will throw 403 exception.
#
Video messageTo send your video message, you need to pass the FileMessage
object with FileMessageParams
set as an argument to the parameter in the sendFileMessage()
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.
#
Document messageTo send your document message, you need to pass the FileMessage
object with FileMessageParams
set as an argument to the parameter in the sendFileMessage()
method.
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the document message |
CALLBACK | FlySendMessageListener | callback to observe the action status |
caution
If Document attachment feature unavailable for your plan then it will throw 403 exception.
#
Location messageTo send your location message, you need to pass the FileMessage
object with LocationMessageParams
set as an argument to the parameter in the sendFileMessage()
method.
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the location message |
CALLBACK | FlySendMessageListener | callback to observe the action status |
caution
If Location attachment feature unavailable for your plan then it will throw 403 exception.
#
Contact messageTo send your contact message, you need to pass the FileMessage
object with ContactMessageParams
set as an argument to the parameter in the sendFileMessage()
method.
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | FileMessage | Object to hold the parameters of the contact message |
CALLBACK | FlySendMessageListener | callback to observe the action status |
caution
If Contact attachment feature unavailable for your plan then it will throw 403 exception.
#
Meet messageTo send your Meet message, you need to pass the MeetMessage
as an argument to the parameter in the sendMeetMessage()
method.
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | MeetMessage | Object to hold the parameters of the meet message |
CALLBACK | FlySendMessageListener | 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()
Argument | Type | Description |
---|---|---|
MESSAGE_PARAMS | TextMessage | Object to hold the parameters of the text message |
CALLBACK | FlySendMessageListener | callback to observe the action status |
#
Receive MessageTo receive a metaData 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.
info
To learn more on message listener callbacks, see the Message Events Delegate
.