Multi-Device Message Synchronization
In instant messaging services, a single user account may be logged in on multiple devices. Multi-Device Message Synchronization is a service provided by RC's server that enables message synchronization across multiple devices under the same user account.
By default, RC does not synchronize messages between devices. When a new message is received by one device, other devices cannot receive the same message. For example, if both Web and mobile clients are logged in simultaneously, the mobile client will not receive messages that have already been received by the Web client.
Applicable Scenarios
In RC's instant messaging services, Multi-Device Message Synchronization applies to the following situations:
- When the same user account is simultaneously online across multiple devices (regardless of device type) and requires synchronized message exchange. For instance, a user may own multiple mobile devices, such as two Android devices and one iOS device.
RC natively supports simultaneous multi-platform online presence, allowing a single user account to be logged in on up to one device each across mobile, Web, desktop, and mini-program clients. However, if you need to allow app users to be simultaneously online on multiple mobile devices or multiple mini-program clients, please refer to Multi-Platform Online Presence.
- When a user switches devices (regardless of previous login history on the new device) and requires synchronization of message history. For example, when a user logs out from an Android device and logs in via a Web client on another device.
- When a user reinstalls the app on the same device and requires synchronization of message history.
Message Types Supported for Multi-Device Synchronization
Not all message types support multi-device synchronization. Status messages can only be synchronized when multiple devices are simultaneously online - offline devices cannot receive these messages through Multi-Device Message Synchronization.
The following scenarios are considered status messages:
- Message types predefined as status messages in RC's built-in message system. Specifically includes: typing status messages (
RC:TypSts). - Custom status message types. Refer to each client's "Custom Messages" documentation for details.
- All messages (regardless of type) sent via server API status message interfaces do not support synchronization. Specific APIs include: sending private status messages (
/statusmessage/private/publish.json) and sending group status messages (/message/group/publish.json).
Service Activation
Navigate to the Console and enable the Multi-Device Message Synchronization service in the Feature Configuration interface under IM services. This service is free to use in development environments and is disabled by default. For production environments, prepayment is required before activation.
Service activation/deactivation changes take effect within 15 minutes.
Impact on Other Features or Services
The status of the Multi-Device Message Synchronization service affects offline message compensation?, message recall, and chatroom services in RC's instant messaging system.
Impact on Offline Compensation
The Console's Multi-Device Message Synchronization service includes the toggle for RC's server-side offline compensation mechanism?.
When Multi-Device Message Synchronization is enabled, RC's server automatically activates offline compensation for the app. The offline compensation mechanism triggers in the following scenarios:
- Device switching. When users log in on a new device (regardless of previous login history), the SDK can retrieve messages sent/received on other terminals within a specified period (default compensation period is 1 calendar day).
- App reinstallation. Since messages and conversation lists are stored in local databases, uninstalling the app deletes this data. When users reinstall the app and reconnect, RC's offline compensation mechanism triggers, allowing the SDK to retrieve messages sent/received on other terminals within a specified period (default compensation period is 1 calendar day).
In device switching or app reinstallation scenarios, the offline compensation mechanism can only retrieve conversations from recent history (default compensation period is 1 day, maximum 7 days). Conversations older than this period cannot be retrieved. Therefore, the post-compensation conversation list may not match the original device's list (creating a potential perception of lost conversations).
To modify the offline message compensation period, submit a ticket. Exercise caution when adjusting this period - excessive message volume for individual users may create significant processing pressure on client devices.
Impact on Web Platform Connection Limits
Enabling Multi-Device Message Synchronization allows additional Web page connections (each browser tab counts as a separate connection), with a maximum of 10 connections.
Impact on Message Recall
- Without Multi-Device Message Synchronization, recalled messages cannot be synchronized across devices.
- With Multi-Device Message Synchronization enabled, when the sender recalls a message:
- Other online devices immediately synchronize the recall
- Offline devices synchronize the recall upon next login
Impact on Server API Message Delivery
When sending messages via server API, certain interfaces allow specifying whether the sender should receive the message on their client through the isIncludeSender parameter.
- Without Multi-Device Message Synchronization, messages sent via Server API are only synchronized to the sender's online client immediately if they're currently logged in, and cannot be synchronized to offline clients.
- With Multi-Device Message Synchronization enabled, messages sent via Server API will synchronize to the sender's client when they next log in, even if they were offline during sending.