Send a Message
Text message#
Text 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 message#
To 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()storageFolderNameshould 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 message#
Video 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()storageFolderNameshould 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 message#
To 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()storageFolderNameshould 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 message#
Document 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()storageFolderNameshould 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 message#
Location 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 message#
Contact 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.
Meet message#
A 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 link#
Before 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
To send your Meet message, you need to pass the MessageParams.meet object as an argument to the parameter in the sendMessage() method.
- Dart
- Response
| Argument | Type | Description |
|---|---|---|
| messageParams | MessageParams.meet | Object to hold the parameters of the meet message |
| flyCallback | FlyResponse | callback to observe the action status |
Note : You can listen to incoming messages by using the onMessageReceived listener.