Send a Message
#
Text messageText is a basic form of communication between users. sdk provides methods to send the text message to the end users. once the user has sent message via sdk, it will give callback with status. if you want send the text message for a user, you can utilise the below method.
To send your text message, you need to pass the MessageParams.text
object as an argument to the parameter in the sendMessage()
method.
- Dart
- Response
Argument | Type | Description |
---|---|---|
messageParams | MessageParams.text | Object to hold the parameters of the text message |
flyCallback | FlyResponse | callback to observe the action status |
Note : You can listen to incoming messages by using the onMessageReceived listener.
#
Image messageTo send image as a message call the below method. Calling the below method will upload the image file to the server provided during sdk initialization then send the message
To send your image message, you need to pass the MessageParams.image
object as an argument to the parameter in the sendMessage()
method.
- Dart
- Response
Argument | Type | Description |
---|---|---|
messageParams | MessageParams.image | Object to hold the parameters of the image message |
flyCallback | FlyResponse | callback to observe the action status |
Note : You can listen for incoming media messages with the onMessageReceived event. Additionally, use the onMediaStatusUpdated event for status updates, and track upload/download progress using the onUploadDownloadProgressChanged event.
Note : In
Mirrorfly.initializeSDK()
storageFolderName
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.
#
Video messageVideo sharing is very useful communication between users. sdk provides methods to send the video message to the end users. once the user has sent message via sdk, it will give callback with status. if you want send the video message for a user, you can utilise the below method.
To send your video message, you need to pass the MessageParams.video
object as an argument to the parameter in the sendMessage()
method.
- Dart
- Response
Argument | Type | Description |
---|---|---|
messageParams | MessageParams.video | Object to hold the parameters of the video message |
flyCallback | FlyResponse | callback to observe the action status |
Note : You can listen for incoming media messages with the onMessageReceived event. Additionally, use the onMediaStatusUpdated event for status updates, and track upload/download progress using the onUploadDownloadProgressChanged event.
Note : In
Mirrorfly.initializeSDK()
storageFolderName
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.
#
Audio messageTo send audio as a message call the below method. Calling the below method will upload the audio file to the server provided during sdk initialization then send the message
To send your audio message, you need to pass the MessageParams.audio
object as an argument to the parameter in the sendMessage()
method.
- Dart
- Response
Argument | Type | Description |
---|---|---|
messageParams | MessageParams.audio | Object to hold the parameters of the audio message |
flyCallback | FlyResponse | callback to observe the action status |
Note : You can listen for incoming media messages with the onMessageReceived event. Additionally, use the onMediaStatusUpdated event for status updates, and track upload/download progress using the onUploadDownloadProgressChanged event.
Note : In
Mirrorfly.initializeSDK()
storageFolderName
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.
#
Document messageDocument sharing is very useful communication between users. sdk provides methods to send the document message to the end users. once the user has sent message via sdk, it will give callback with status. if you want send the document message for a user, you can utilise the below method.
To send your document message, you need to pass the MessageParams.document
object as an argument to the parameter in the sendMessage()
method.
- Dart
- Response
Argument | Type | Description |
---|---|---|
messageParams | MessageParams.document | Object to hold the parameters of the document message |
flyCallback | FlyResponse | callback to observe the action status |
Note : You can listen for incoming media messages with the onMessageReceived event. Additionally, use the onMediaStatusUpdated event for status updates, and track upload/download progress using the onUploadDownloadProgressChanged event.
Note : In
Mirrorfly.initializeSDK()
storageFolderName
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.
#
Location messageLocation sharing is a famous communication between users. sdk provides methods to send the location message to the end users. once the user has sent message via sdk, it will give callback with status. if you want send the location message for a user, you can utilise the below method.
To send your location message, you need to pass the MessageParams.location
object as an argument to the parameter in the sendMessage()
method.
- Dart
- Response
Argument | Type | Description |
---|---|---|
messageParams | MessageParams.location | Object to hold the parameters of the location message |
flyCallback | FlyResponse | callback to observe the action status |
Note : You can listen to incoming messages by using the onMessageReceived listener.
caution
If Location attachment feature unavailable for your plan then it will throw 403 exception.
#
Contact messageContact sharing is very useful communication between users. sdk provides methods to send the contact message to the end users. once the user has sent message via sdk, it will give callback with status. if you want send the contact message for a user, you can utilise the below method.
To send your contact message, you need to pass the MessageParams.contact
object as an argument to the parameter in the sendMessage()
method.
- Dart
- Response
Argument | Type | Description |
---|---|---|
messageParams | MessageParams.contact | Object to hold the parameters of the contact message |
flyCallback | FlyResponse | callback to observe the action status |
Note : You can listen to incoming messages by using the onMessageReceived listener.
caution
If Contact attachment feature unavailable for your plan then it will throw 403 exception.