Patterns Notifications

Notifications

Android only

Notifications provide short, timely, and relevant information about your app when it’s not in use.

Notifications are intended to inform users about events in your app. These two types of notifications are the most effective:

  • Communication from other users
  • Well-timed and informative task reminders

Notification components

Header area
Content area
Action rail

How notifications may be noticed

  • Showing a status bar icon
  • Appearing on the lock screen
  • Pulsing the device's LED
  • Playing a sound or vibrating
  • Peeking onto the current screen

Anatomy of a notification Expand and collapse content An arrow that points down when collapsed and points up when expanded.

Android N highlights

In Android Nougat (Android N), notifications have been designed to make it easier for users to scan and use a notification’s most important elements:

Primary content

Content is the most prominent element of a notification. Secondary information, such as a timestamp, is smaller and consolidated above the primary content.

People

Avatars appear on the right side of a notification.

Actions

Expandable notifications are revealed by tapping an indicator icon. Actions are displayed using text only (which accommodates more characters) on a separate background color and location.

Collapsed notification on Android M (above) and Android N (below)

Collapsed notification on Android M (top)
The avatar and icon are on the left and the timestamp is on the right.

Collapsed notification on Android N (bottom)
The app icon, app name, timestamp, and expansion indicator icon appear on the top left. The avatar is on the right.

Expanded notification on Android M (above) and Android N (below)

Header area

New for Android N, the header area is comprised of:

1. The app icon: The app icon is a small two-dimensional representation of your app's identity. It appears in monochrome in the status bar. If your app sends a wide variety of notifications, you may replace your app's identity icon with a symbol that reflects the content type. For example, Google Now uses a cloud icon for weather notifications.

2.The app name: Starting in Android N, the name of the app automatically appears in the notification.

3.Header text (optional): Header text is usually only needed if an app sends notifications from multiple sources, such as the account name for users with multiple accounts.

4. Timestamp (optional): By default, a timestamp does not appear, but it may be added if it's important to display when a notification was sent, such as the time of a missed call.

5. Expand indicator: This appears if the notification can be expanded.

The header area is new for Android N.

Content area

The content area is comprised of:

1. A content title: A brief headline for the notification

2. Content text: Supporting information

3. Large icon (optional): An image may be added to reinforce the notification in a meaningful way, such as a message that includes a photo of the sender

Android N's notifications are wider, resulting in a less cluttered presentation of the main content.

Action area

When expanded, a notification may display up to three actions on a strip at the bottom.

Starting in Android N, actions are shown without icons in order to accommodate more text. An icon should still be provided because devices with earlier versions of the OS continue to rely on it, as will Android Wear and Android Auto devices.

The action area in an Android N notification.

Usage Expand and collapse content An arrow that points down when collapsed and points up when expanded.

When not to use a notification

Notifications should not be the primary communication channel with your users, as frequent interruptions may cause irritation. The following cases do not warrant notification:

  • Cross-promotion, or advertising another product within a notification, which is strictly prohibited by the Play Store
  • An app that a user has never opened
  • Messages that encourage the user to return to an app, but provide no direct value, such as "Haven't seen you in a while"
  • Requests to rate an app
  • Operations that don't require user involvement, like syncing information
  • Error states from which the app may recover without user interaction

Don't.

Don’t send holiday or birthday greetings in the form of notifications.

Don't.

Don’t interrupt the user in the middle of a task for the sole purpose of asking if you're doing a good job.

Behavior Expand and collapse content An arrow that points down when collapsed and points up when expanded.

Notification arrival

When a notification arrives, it gets added to the notification drawer. You may specify if its delivery includes:

  • Making a sound or vibration
  • Peeking onto the current screen to grab the user's attention

Users may choose to block notifications. Starting in Android N, they may also prevent an app’s notifications from making sounds, vibrating, or peeking.

When a notification arrives, an icon usually appears in the status bar. This signals to the user that there's something to see in the notification drawer.

If it's important to grab a user's attention in the middle of a task, an app can have the notification peek onto the current screen.

Notification drawer

The notification drawer in Android typically shows notifications in reverse-chronological order, with adjustments influenced by:

  • The app's stated notification priority
  • Whether the notification recently alerted the user with a sound or vibration
  • Any people attached to the notification and whether they are starred contacts

Stale notifications

The notification drawer is intended to show the user information relevant to this very moment in time. If a notification you sent earlier is no longer relevant, automatically dismiss it.

In this notification drawer, a text that just arrived appears at the top. A lower priority notification about the weather appears at the bottom.

Notification interactions

Users may interact with a notification in the following ways:

1. To navigate to a destination

To navigate, a user may tap a notification. If the notification appears on a locked screen, the user will need to double-tap it and then enter their PIN, pattern, or password.

When the user taps a notification, they should be taken to a screen in your app that relates directly to that notification and lets them take immediate action. For example, if the notification says it's their turn in a two-player game, tapping the notification should take them directly to that game.

2. To see an expanded view

If offered, an expand indicator appears in the header. A user may tap the indicator or swipe down the notification body to expand it.

An expanded notification

3. To dismiss it (if permitted)

A user may dismiss a notification by swiping it left or right.

Ongoing notifications that indicate a continuing process in the background, such as music playing, may not be dismissed with a swipe.

A notification being dismissed

4. To choose how similar notifications should be delivered in the future

A user may adjust how notifications for an app are delivered by touching and holding an individual notification. In Android N, the user may also gently swipe the notification left or right and then tap the settings icon to access these controls.

Notification settings

Multiple notifications

For apps that may generate multiple notifications of the same type, Android offers two different approaches to represent them: summarizing and bundling.

Summarizing

Instead of displaying multiple notifications, you can create one notification that summarizes them all. For example, a messaging app might have a summary notification that says "3 new messages.” Upon expansion, it could show a snippet for each message.

Multiple notifications summarized, shown in both collapsed view and expanded view.

Bundling

Starting in Android N, you may present multiple notifications from your app in a grouped and hierarchical manner:

  • A parent notification displays summary information for all child notifications.
  • If the user expands the parent notification, all child notifications are revealed.
  • The user may expand a child notification to reveal its entire content.

When child notifications are presented, the system automatically removes any redundant header information. For example, if a child notification's app icon is the same as the parent notification’s app icon, then the child notification's header does not include an icon.

Child notifications should be able to stand on their own because the system may choose to show them outside of the bundle when they arrive.

Bundled notifications, shown in both collapsed and expanded views

Expanded views

You may display more information in a notification through an expanded view, without navigating away from the notification.

Collapsed and expanded notifications

A notification may offer up to three actions when expanded. It should not duplicate the action taken from tapping on the notification body.

Don't.

Don’t include text actions that duplicate the behavior of tapping on the notification body.

Do.

When Android's Clock app has a timer running, this notification lets the user pause or add a minute directly from the notification.

Enable typing into notifications

In Android N, apps may enable the user to type directly into a notification. Users may type small amounts of text, such replying to a text message or jotting a brief note.

For long-form typing, navigate users to your app, where they benefit from more space to view and edit text.

If you're using this functionality for a messaging app, keep the notification around after the user has sent the reply, and wait until the conversation has reached a lull before automatically dismissing it.

Users of Android's Messenger app can reply directly to any message without leaving the notification

Types of notifications Expand and collapse content An arrow that points down when collapsed and points up when expanded.

Notifications are considered either transactional or non-transactional.

Transactional

Transactional notifications provide content that a user must receive at a specific time in order to do one of the following:

  • Enable human-to-human interaction
  • Function better in daily life
  • Control or resolve transient device states

Non-transactional

If none of the above situations describe your notification, then it is non-transactional.

Transactional notifications can help users...

Examples

Enable human-to-human interaction

  • Incoming phone calls or text messages
  • Notification of a user's turn in a two-player game

Function better in daily life

  • Calendar event about to take place
  • A reminder or alarm set up by the user
  • Delayed flight
  • Delivered order

Control or resolve temporary device states

  • Music playing
  • Turn-by-turn navigation
  • Stopwatch running
  • Screenshot taken

Non-transactional opt-out and opt-in

Non-transactional notifications should be optional, as they may not appeal to all users. You can make them optional in one of two ways:

  • Opt-out: Users receive opt-out notifications by default, but they may stop receiving them by turning off a setting.
  • Opt-in: Users only receive opt-in notifications by turning on a setting in your app.

Opt-out

Avoid the opt-out approach unless your notifications meet both of the following criteria:

  • They provide concrete value to the user
  • They clearly relate to the user's context (such as current location, current date or time, past history, or expressed interests)

Example notification

Reason to avoid using opt-out notifications here

A random tip on how to use an app

Provides concrete user value but isn't contextual

A prompt to rate content recently used in the app

Contextual, but doesn't provide concrete user value

This notification from YouTube takes the opt-out approach. It offers both context (a YouTube channel the user has subscribed to) and value (a new video from that channel). The "Options" action navigates the user to where they can opt out of future notifications for this channel.

Opt-in

The opt-in approach is more conservative. Because users explicitly choose to receive these notifications, it's more likely they'll be glad to see them. However, they must visit settings to find out how to receive them. You may inform users about these notifications from other places in your app, such as an onboarding flow or a dismissible card.

This app takes the opt-in approach. A card at the top of the app lets users know that they can receive notifications for breaking news stories. If the user wants to opt in, they choose Yes. Otherwise, they choose No Thanks and remain opted out. This choice is also available in the app's settings.

Settings and priority Expand and collapse content An arrow that points down when collapsed and points up when expanded.

Notification settings

Include a setting in your app for turning all notifications on or off. Additionally, consider offering granular settings, such as letting users choose notification sounds or receiving specific notification types.

Enable users to navigate directly to notification settings from the Android Settings app by creating a link there using the appropriate AndroidManifest tags.

Assign appropriate priority levels

Android allows you to assign a priority level to each notification to influence how the Android system will deliver it. The higher the priority, the more interruptive it will be — for example, MAX and HIGH priority notifications will peek onto the user's current screen, no matter what they are doing.

Prioritize with the utmost consideration for the user's time and attention. When an unimportant notification is disguised as urgent, it tricks users into unnecessary anxiety.

To give users relief from overly interruptive notifications, users can quickly silence or block an app's notifications directly on the notification itself.

Priority

Use

MAX

For critical and urgent notifications that alert the user to a condition that is time-critical or needs to be resolved before they can continue with a time-critical task.

HIGH

Primarily for important communication, such as messages or chats.

DEFAULT

For all notifications that don't fall into any of the other priorities described here.

LOW

For information and events that are valuable and/or contextually relevant to the user, but aren't urgent or time-critical.

MIN

For nice-to-know background information that isn't aimed specifically at the user. For example, weather or nearby places of interest.

Pre-defined categories

Assign your notification to the most suitable predefined category. Android may use this information to make ranking and filtering decisions.

Category

Description

CATEGORY_CALL

Incoming call (voice or video) or similar synchronous communication request

CATEGORY_MESSAGE

Incoming direct message (SMS, instant message, etc.)

CATEGORY_EMAIL

Asynchronous bulk message (email)

CATEGORY_EVENT

Calendar event

CATEGORY_PROMO

Promotion or advertisement

CATEGORY_ALARM

Alarm or timer

CATEGORY_PROGRESS

Progress of a long-running background operation

CATEGORY_SOCIAL

Social network or sharing update

CATEGORY_ERROR

Error in background operation or authentication status

CATEGORY_TRANSPORT

Media transport control for playback

CATEGORY_SYSTEM

System or device status update. Reserved for system use.

CATEGORY_SERVICE

Indication of running background service

CATEGORY_RECOMMENDATION

A specific, timely recommendation for a single thing. For example, a news app might recommend a news story the user might want to read next.

CATEGORY_STATUS

Ongoing information about device or contextual status

Notification sounds

When you assign a priority of DEFAULT or higher to a notification, you may optionally provide a sound to play when the notification is delivered. However, you should deliver your notification silently unless one or more of the following are true:

  • The notification helps the user uphold a time-sensitive social expectation, such as an incoming phone call or a reminder for a work meeting in five minutes.
  • The notification tells the user about something they should do or know at that moment in order to function better in their daily life, such as a notification that a flight is delayed.
  • The user has explicitly requested that this notification make a sound upon arrival (if offered as an option in settings, and off by default).

Lock screen Expand and collapse content An arrow that points down when collapsed and points up when expanded.

Android evaluates each notification's visibility level to figure out what can safely be shown. A user may choose to show notifications when their screen is locked. They may also conceal any content that an app marks as sensitive.

Sensitive content on lock screens

Because notifications are visible on the lock screen, user privacy is an important consideration. For each notification you create, set a visibility level to either public, private, or secret.

Public notifications are fully visible on secure lock screens, while secret notifications are hidden.

Private notifications fall in the middle: they show only basic information about the existence of the notification, including its icon and name of the app that posted it. The content is replaced with a default message that says "Contents hidden.” You can replace this message with a redacted version of the content that is still useful but does not reveal personal information, such as "2 new messages.”

This user has chosen to show all notification content on the lock screen.

This user has chosen to hide sensitive content from the lock screen. Because these apps gave their notifications a visibility level of "private,” they show "Contents hidden" by default.

Style Expand and collapse content An arrow that points down when collapsed and points up when expanded.

Clear and concise text

Android truncates content titles to a single line (even when expanded).

Content titles should:

  • Be under under 30 characters long
  • Contain the most important information
  • Avoid variables – unless they contain a number or short text string, or are preceded by static text
  • Exclude the app's name, which already appears in the header

Don't.

The content title shows the app name, which is redundant with the header area and uses up available characters.

Content text should:

  • Avoid exceeding the 40-character limit
  • Not repeat what's in the content title

Do.

The content title shows the most important information.

The large icon

In Android N, the large icon is only meant for specific situations in which imagery meaningfully reinforces the notification's content, including:

  • Communication from another person, such as the image of someone sending a message
  • The source of content if it's different than the app sending the notification, such as the logo from a YouTube channel to which the user is subscribed
  • Meaningful symbols about the notification, such as an arrow symbol for driving directions

Large icons should be circular when showing a person, but square in all other cases.

Don't.

The large icon is not intended for branding.

Do.

The large icon is meant to reinforce the content of the notification in a meaningful way, such as a person's photo attached to a message notification.

Templates Expand and collapse content An arrow that points down when collapsed and points up when expanded.

Google uses the following notification templates in its suite of Android apps, which you may adapt for your own needs.

Standard

The standard template works well for most notifications, allowing for a succinct message, a large icon when applicable, and actions.

Standard template for collapsed and expanded notifications

Big text

Use this template when you have longer text to display. It lets the user preview more of the text when the notification is expanded.

Big text template for collapsed and expanded notifications

Big picture

Use this template when the notification contains a picture. The large icon offers a thumbnail of the picture, and the user can get a bigger preview by expanding the notification.

Big picture template for collapsed and expanded notifications

Progress

Use this template for activities initiated by the user that need time to complete and can be canceled at any time. (Non-cancelable activities don't warrant notifications.)

Progress template for collapsed and expanded notifications

Media

Use this template to let the user control media currently playing from your app. The collapsed view displays up to three actions, and the large icon can be used for a related image, such as an album cover. The expanded view displays up to five actions with a larger image, or six actions if no image is displayed.

Media template for collapsed and expanded notifications