Joke Collection Website - Blessing messages - MIUI displays the permission description of the desktop application corner.

MIUI displays the permission description of the desktop application corner.

On the premise that the permission of "Display Desktop Icon Corner" is turned on by the application, after the notification is displayed, the notification bar will inform the desktop to update the application icon corner.

The calculation logic of the corner marker value is to count the non-resident notices (notices that can be cleared manually) displayed in the notification bar and accumulate their messageCount values.

The messageCount value of each notification is 1 by default, and developers can set the messageCount value through reflection. Please refer to the developer's documentation: MIUI 6 to MIUI 1 1 desktop corner adaptation instructions.

When the user clicks the application icon on the desktop to start the application, the application corner will be hidden at the same time. The corner marker will not be displayed again until the application sends a new notification or updates the messageCount value of the notification.

Q: The application sent a notification, but the desktop application corner was not displayed.

A: First, open the application notification settings page, click Application in "Settings-Notification Management" and check whether the "Display Desktop Icon Corner" switch is turned on. By default, most applications are closed.

Secondly, confirm whether there are non-resident notifications (notifications that can be cleared manually) for this application in the notification column.

Finally, you need to confirm whether the messageCount value of the notification is correct.

Q: Some foreign chat applications always display 1 after receiving messages and sending notifications.

A: When the same contact sends a new message, this kind of application is realized by updating the notification content, that is, there is always only one notification in the notification bar, so the corner value is displayed as 1.

If the application wants to customize the displayed corner marker value, please refer to: MIUI 6 to MIUI 1 1 desktop corner marker adaptation instructions.

Q: Desktop application icons display corner markers. When the application is closed in a recent task, the corner marker disappears.

A: After the recent task closes the application, all notifications of the application will be cleared, so the desktop application corner will be hidden.

Q: Desktop application icons display corner markers. When you click the application icon, the corner marker disappears.

A: After clicking the application icon, the corner of the application icon is hidden by default.

It can be redisplayed in the following two ways:

Mode 1: a new notification is sent, and its notification id is not duplicate with the previously sent notification id.

Method 2: Update the messageCount value of the sent notification.

Q: Why is the maximum display value of the desktop application corner marker 9?

A: The number of notifications sent by the applications displayed in the notification bar is limited, and each application can only display 10 notifications at most.

If the groupkey is not specified in the application, the system will send automatic summary notifications for more than three projects by default, and display the notifications of the application by group. That is to say, in this case, the number of notifications visible to users is 9, and the application corner displayed on the desktop is also 9.

If the application wants to customize the displayed corner marker value, please refer to: MIUI 6 to MIUI 1 1 desktop corner marker adaptation instructions.

Q: Is there any other way to set the messageCount value?

A: There are two ways:

mode 1:notification . number = message count;

Method 2: notification.extras.putint ("miui.messagecount", messagecount);

Q: The value of messageCount is set through the developer's documentation, but the value displayed in the corner label of the desktop application is different from expected.

A: The desktop application corner value is the messageCount value of non-resident notifications (notifications that can be cleared manually) displayed in the notification bar. That is, after the developer sets the messageCount value of the notification, the desktop application corner label will display the set messageCount value.

Q: How do I view the messageCount value of a notification?

A: Connect the computer to MIUI 12 mobile phone, execute: ADB shell dumpsys activity service systemuiservice on the command line, and search the activity notification field to view all the notifications displayed in the current notification bar.

Find the corresponding notification through pkg+ notification id, and check whether its messageCount value meets expectations.