Google is committed to advancing racial equity for Black communities. See how.

People and conversations

The people and conversations initiative is a multi-year Android initiative that aims to elevate people and conversations in the system surfaces of the phone. This priority is based on the fact that communication and interaction with other people is still the most valued and important functional area for the majority of our users across all demographics.

A number of features were introduced in Android 11 to support the people and conversations initiative.

Conversation space

The conversation space is a dedicated notification area for real-time
       conversations between humans.
Figure 1: The conversations space.

On many phones, there is a separate section on top of the notification shade containing only real-time conversations with people (such as calls and chat messages, including group chats). Notifications in this space look and act differently from non-conversation notifications on many phones:

  • The design is different, with a strong emphasis on the avatar representing people combined with the app carrying the conversation.
  • A tap on the notification opens the conversation in the app (or bubble, if the conversation was previously bubbled), and a tap on the caret expands the new messages in the shade to full length with the full list of options.
  • Conversation-specific actions are offered (some by long-pressing):
    • Mark this conversation as priority
    • Promote this conversation to bubble (only shown if the app supports bubbles)
    • Silence notifications for this conversation
    • Set custom sounds or vibrations for this conversation

Conversations in Bubbles

If a notification meets the conversation requirements, the platform
       launches it as a bubble from the notification drawer.
Figure 2: Notification being launched as a bubble from the notification drawer.

Beginning in Android 11, Bubbles can be started from notifications in the Conversations section. Only notifications with an associated shortcut are able to bubble. Conversations bubble automatically if they are marked as important or are triggered to bubble in the notification shade.

Conversation Shortcuts

Shortcuts to conversations appear in the launcher and alongside long-lived, sharing shortcuts in the system sharesheet.

API guidelines

This section describes the APIs to add support in your app for the system-provided space that shows people and conversations.

Shortcuts for Conversations

In order to participate in this conversation-centric initiative, apps need to provide the system with long-lived shortcuts. We strongly recommend using long-lived sharing shortcuts. If necessary, you can use dynamic shortcuts in Android 11, but we may remove this option in the future.

To publish a shortcut to the conversation, call the existing ShortcutManager methods setDynamicShortcuts(), addDynamicShortcuts(), or pushDynamicShortcut() (which automatically manages the shortcut limit for the developer). This shortcut must be long-lived and have Person data attached for one or more persons, identifying the other participants in the conversation. We also recommend that you set the LocusId for the shortcut and annotate the in-app activities and fragments with that LocusId. Doing so helps the system to accurately rank conversations based on app usage.

If a conversation no longer exists, the app can delete the shortcut with removeLongLivedShortcuts(); doing so causes the system to delete all data associated with the conversation. Although shortcuts are removable, apps shouldn't remove cached shortcuts unless absolutely necessary; a shortcut is probably cached because the user interacted with it to change their experience, and removing the shortcut will undo those changes, leading to user frustration.

Conversation Notifications

A notification is considered as a conversation notification if the following is true:

  • The notification uses MessagingStyle.

  • (Only if the app targets Android 11 or higher) The notification is associated with a valid long-lived dynamic or cached sharing shortcut. The notification can set this association by calling setShortcutId() or setShortcutInfo(). If the app targets Android 10 or lower, the notification doesn't have to be associated with a shortcut, as discussed in the fallback options section.

  • The user hasn't demoted the conversation from the conversation section via notification channel settings, at the time of posting.

Help rank in-app conversations using LocusId

On-device intelligence determines the conversations that the user is most likely to be interested in. Among the most important signals are recency and frequency of conversation sessions in each conversation. The system knows about interactions with a conversation from Launcher shortcuts or within a notification if they are properly tagged. However, the system doesn't know about conversations that happened fully in the app unless those interactions are also tagged. Thus, we strongly recommend that you attach a LocusId to the shortcut and annotate the in-app activity or fragment with the associated LocusId. Using the LocusId allows the suggestion system to properly rank the conversation. If you use setShortcutInfo() to associate the conversation with a shortcut, the conversations system automatically attaches the appropriate LocusId.

Conversation space requirements for apps that target Android 10 or lower

If an app doesn't target Android 11, its messages can still be surfaced in the conversation space. However, the app still must meet certain requirements. This section describes the requirements for those apps, and the fallback behavior if the app doesn't meet the requirements.

The core requirement for participation in the messaging space is, the app must implement MessagingStyle notifications, and the notifications must reference a long-lived shortcut from the notification that is published at the time the notification is posted. Notifications that meet these requirements appear in the conversation space with this behavior:

  • Notification is displayed in conversation style
  • Bubble button is offered, if implemented
  • Conversation specific functions are offered inline

If the notification doesn't meet these requirements, the platform uses fallback options to format the notification. If a notification meets the requirements of either fallback case, the notification is displayed in the conversation space with special formatting. If the notification doesn't qualify for either fallback option, it isn't displayed in the conversation space.

Fallback: If MessagingStyle is used but no shortcut is provided

If the app targets Android 10 or lower and a notification uses MessagingStyle but does not associate the message with a shortcut, the notification is shown in the conversation space with this behavior:

  • Notification is displayed in conversation style
  • No bubble button is offered
  • No conversation-specific functions are offered inline

Fallback: If MessagingStyle isn't used, but the app is a recognized messaging app

If a notification doesn't use MessagingStyle but the app is recognized by the platform as a messaging app, and the notification's category parameter is set to msg, the notification is shown in the conversation space with this behavior:

  • Notification is displayed in old, pre-Android 11 style
  • No bubble button is offered
  • No conversation-specific functions are offered inline

Guidance, usage, and testing

This section provides general guidance on how to use and test the conversation features.

When should I use conversations?

Conversation Notifications and related shortcuts are intended to improve the user experience of real-time conversations. For example, SMS, text chats, and phone calls are real-time conversations where users expect to communicate quickly. Users don't have that expectation with emails and activities unrelated to conversations.

We’ve given users the ability to remove a given conversation from the conversation section if they don’t feel it’s in the right space.

Providing great shortcuts

To be featured in the conversation space, you must provide shortcuts if your apps targets Android 11 or higher. Provide an AdaptiveIconDrawable for the shortcut's icon or your shortcut avatar may be unintentionally clipped; see Providing shortcut imagery for more details.

Your shortcut is ranked in different system surfaces, including the system sharesheet if it's a sharing shortcut. Learn more about how to get the best ranking and help the system promote your shortcut.

Testing Conversation Notifications and shortcuts

Long-pressing on a conversation opens a menu of
  conversation-related actions.
Figure 3: You can verify that a conversation notification is properly configured by long-pressing on it and checking that the conversation menu appears.

If you follow the conversation space guidelines, conversations should automatically appear in the conversation space. You can verify that the shortcut is properly integrated by long-pressing on the notification. If the integration is done properly, the UI shows conversation-related actions. If the notification isn't linked to a shortcut, the UI shows text stating that the app doesn't support conversation features.

Added shortcuts display on a long-press on the app launcher. Be sure to test that the shortcuts take you to the correct place within your app.

Added sharing shortcuts are shown in the system Sharesheet's direct share row when sharing content that your sharing shortcut can receive.