tencent cloud

All product documents
Tencent Push Notification Service
Message Collapse
Last updated: 2024-01-16 17:34:39
Message Collapse
Last updated: 2024-01-16 17:34:39

Overview

If a mobile phone receives multiple messages from the same application, these messages will be collapsed in the notification center according to the corresponding rule to avoid disturbing the user. However, this mechanism will reduce the exposure of a push and thus lower the operating profits. Both the native Android and iOS systems provide the corresponding settings. You can use the message collapse feature to collapse messages of the same type based on your operation needs so that the pushed messages can be read more easily.

Application Scope

Mobile Phone OS
OS Version
SDK Version
Push Channel
Android
Android 7.0 or above
TPNS SDK v1.2.0.1 or above
Tencent Push Notification Service channel
iOS
iOS 10 or above
TPNS SDK v1.2.0.1 or above
APNs channel

Directions

Using the console

1. Log in to the Tencent Push Notification Service console. In the left sidebar, click Message Management > Task List. Then, click Create Push > Advanced Settings.


2. Set a message collapse rule, as shown in the following figure:

The following three options are provided for you to set whether and how to collapse messages in the notification center:
System Default: uses the default collapse rule of the system. The following are system default rules of some vendors:
Native Android: If there are 5 or more messages of the same application, these messages will be collapsed into a group. The number on the right of the collapsed messages is the number of unread messages. When they are expanded, up to 8 messages can be displayed.
Huawei: If there are 2 or more messages of the same application, these messages will be collapsed into one group. The number on the right of the collapsed messages is the number of unread messages. When they are expanded, up to 8 messages can be displayed.
Mi: If there are 4 or more messages of the same application, these messages will be collapsed into one group. The number on the right of the collapsed messages is the number of unread messages (up to 7). When they are expanded, up to 10 messages can be displayed.
Meizu: If there are 4 or more messages of the same application, these messages will be collapsed into one group. The number at the top of the collapsed messages is the total number of messages. When they are expanded, up to 35 messages can be displayed.
Note:
Meizu phones provide the unimportant notification feature, which allows users to place excessive notifications in the notification drawer in the upper-right corner, where the notifications will not be collapsed. You can enable "Priority display" in the application notification settings to disable this feature.
OPPO: If there are 4 or more messages of the same application, these messages will be collapsed into one group. The number on the right of the collapsed messages is the number of unread messages. When they are expanded, up to 8 notifications can be displayed.
Vivo: If there are 2 or more messages of the same application, these messages will be collapsed into one group. The number of collapsed messages will not be displayed. When they are expanded, up to 8 notifications can be displayed.
Uncollapsed: The message will not be collapsed with other messages of the same application.
Custom: Messages with the same thread_id will be collapsed.
Note:
You can set this parameter for low-priority messages to collapse them. On the contrary, you can set Uncollapsed for important messages.

Using RESTful APIs

If you want to implement the "Uncollapsed" and "Custom" effects of the console, you need to customize thread_id in the message field of the Push API. For more information, please see Push API - Optional Parameters. Below is a sample push:
{
"audience_type": "token",
"token_list": [
"05da87c0ae******2dfa9e08d884aada5bb2"
],
"message_type": "notify",
"multi_pkg":true,
"message": {
"Title": "Push title",
"content": "Push content",
"android": {
"custom_content":"{\\"key\\":\\"value\\"}"
},
"thread_id":"Activity_id",
"thread_sumtext":"Operation activity"

}
}

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support