Do Not Disturb
Global IM UIKit supports the Do Not Disturb feature. The Conversation Do Not Disturb feature is available out of the box and can be controlled through UI operations or Global IM UIKit's API. If you need global Do Not Disturb, it can be implemented via the IMLib SDK's API.
The Do Not Disturb status will be synchronized to the server, and RC will automatically synchronize the Do Not Disturb status data across devices for users.
Setting Conversation Do Not Disturb
Global IM UIKit allows users to set a conversation to Do Not Disturb status via the UI. Once set, if the user is online and receives a new message, they can still see the message content, but Global IM UIKit will not play a ringtone or show a notification bar alert. If the client is offline, the system will not receive a remote notification alert.
Changing Conversation Do Not Disturb Status via UI
Global IM UIKit provides two methods in the UI to change the Conversation Do Not Disturb status. The unread count of conversations in Do Not Disturb status in the conversation list is displayed in gray.
- In the conversation list, long-press a single conversation to show the Do Not Disturb toggle.
- In the conversation page, expand more options to show the Do Not Disturb toggle.
Changing Conversation Do Not Disturb Status via API
Global IM UIKit provides an API in RCChatListViewModel
to control the Conversation Do Not Disturb status. It is recommended to use the toggleNotification:
and setNotificationLevel:forChatModels:
interfaces provided by RCChatListViewModel
. Global IM UIKit internally handles the IMLib SDK layer interface calls and page refreshes.
Setting Conversation Do Not Disturb Level
Global IM UIKit's Do Not Disturb feature by default only supports enabling or disabling notifications. The IMLib SDK provides more granular Do Not Disturb control (e.g., only receiving @all notifications). You can use the IMLib API to set and query the Do Not Disturb status.
Please refer to the IMLib SDK documentation Set Do Not Disturb by Target ID.
If using IMLib SDK capabilities, please use the API in ChannelClient
.
Setting Global Do Not Disturb
The Global Do Not Disturb feature supports setting a Do Not Disturb time window starting from any time point (HH:MM:SS
). The set Do Not Disturb time window will repeat daily until it is reset or deleted. For example, if an App user wants to set permanent all-day Do Not Disturb, they can set startTime
to 00:00:00
and period
to 1439
.
Global IM UIKit does not directly provide a setting entry in the UI or API layer. You need to use the method in the IMLib SDK to set the global Do Not Disturb period.
Please refer to the IMLib SDK documentation Set Global Do Not Disturb.
If using IMLib SDK capabilities, please use the API in ChannelClient
. It is recommended to support interfaces that can simultaneously configure the "Do Not Disturb Level."