Creating Messages

All message sending methods are designed to be robust enough to work under any network conditions. When you send any message, that message will automatically be put into a queue in case of any unforeseen unstable network conditions. Once the SDK reconnects to the server, it will automatically resend all the queued messages.

Additionally, sent messages are always returned in message queries, even before they have been delivered to the server. This provides the user with a fluid messaging flow: when a user sends a message, that sent message will appear in the message stream right away (instead of waiting until it has been confirmed by the server). To check or display the current status of message delivery for your application, use the syncState property in the message model.

There are three statuses of syncState:

  1. syncing - message is currently syncing to the server

  2. synced - message is synced and stored on both client and server

  3. error - failed to sync message

Amity supports the sending and receiving of the following messages:

Last updated