In Android 11, the Android platform has become more people-oriented and has a richer presentation. After repeatedly exploring how users communicate on mobile devices, we will make Android a more user-friendly operating system. Enable it to identify and prioritize information that is closely related to your personal relationships in your life. As part of that goal, in Android 11, session alerts will be centralized in a dedicated area at the top of the notification bar, which will include user-friendly design and special actions related to the session, such as opening the session as a bubble, creating a session shortcut on the home screen, or setting an alert.

This article will help you understand how the notification bar prioritizes user information in several aspects of notification classification.

What is notification?

Notifications are signals that the UI uses to push information to the user, such as a news message, a chat with a friend, or a notification about an immediate event.

There are many types of notifications, but this article focuses on user notifications because they play a critical role in our daily use and are one of the core features and primary uses of today’s mobile devices.

People notifications

People Notifications are messages that contain one or more persons in the context of push notifications. Starting with Android 8 (Oreo), People Notifications have been “upgraded” in the visual hierarchy of the drop-down notification bar, Its priority is second only to Ongoing or critical notification messages (People to People, or interpersonal message notifications, shown in the figure below, has risen to a level below Major Ongoing messages). In interpersonal message notifications, if the message contains a Person context or has a contact URI, the priority is further increased.

Notification message display hierarchy

As a developer, it is very important to ensure that proper usage notifications are used to convey the proper intent and that the notification area is not misused. For example, a reminder of an upcoming event in a calendar application should not appear in the session area as an urgent reminder. While Android’s powerful features allow users to set the frequency, visibility, and importance of notifications through the notification channel, if best practices are not followed, the value and credibility of an app decreases and can negatively impact its reputation in the app market.

Notify the classification

If you are interested in the details of classification, or how notifications are organized, prioritized, or sorted, the Notification Record is worth your attention. It contains all the information related to notification grading and the logic for notification grading calculation. Notifications are tiered based on several factors: channel Settings (prior to channels, or Android 8.0, notifications were prioritized), level of annoyance, freshness, and context. Decided to various standards of grading, if want to know, please check the implementation NotificationSignalExtractor related classes.

ValidateNotificationPeople parser is worthy of study because it is related to the personal attributes. In the validatePeople method call in the example below, it sets a closeness flag bit parameter that uses importance as a criterion for sorting notifications.

private RankingReconsideration validatePeople(Context context, final NotificationRecord record) {...final PeopleRankingReconsideration rr = validatePeople(context, key, extras, record.getPeopleOverride(), affinityOut);
	
	final float affinity = affinityOut[0]; record.setContactAffinity(affinity); .return rr;
}
Copy the code

The similarity increases with whether the notification is from a valid contact, whether the valid contact is from the user’s address book, whether the contact is starred or bookmarked.

Android 11 and sessions

There are also a number of updates in Android 11 that highlight the importance of interpersonal features. For example, the drop-down notification bar has added a special area for message-style notifications.

For a brand new session area, Bubbles appear above notifications and are associated to user sessions in a floating window.

Dedicated session areas and bubbles enhance the user’s focused experience

Take a look at the Conversation API page in the Android developer documentation to see how, by following specific guidelines, conversations can emerge from various parts of the system, facilitating sharing and enabling users to do something with someone in context.

People first

The updates in Android 11 mentioned in this article illustrate the future of the platform and the continued improvement in the experience of human interaction. For more updates and API guidance on Android 11, please refer to the Sessions page of the Android Developer documentation.

The relevant information

  • Android Developer official documentation | session

  • Android Message Notification