Show
Latest developer preview lets you access it from the notification shade
Figure 1. Notification icons appear on the left side of the status bar Users can swipe down on the status bar to open the notification drawer, where they can view more details and take actions with the notification. Figure 2. Notifications in the notification drawer Users can drag down on a notification in the drawer to reveal the expanded view, which shows additional content and action buttons, if provided. Starting in Android 13, this expanded view includes a button that allows users to stop an app that has ongoing foreground services. A notification remains visible in the notification drawer until dismissed by the app or the user. Heads-up notificationBeginning with Android 5.0, notifications can briefly appear in a floating window called a heads-up notification. This behavior is normally for important notifications that the user should know about immediately, and it appears only if the device is unlocked. Figure 3. A heads-up notification appears in front of the foreground app The heads-up notification appears the moment your app issues the notification and it disappears after a moment, but remains visible in the notification drawer as usual. Example conditions that might trigger heads-up notifications include the following:
Lock screenBeginning with Android 5.0, notifications can appear on the lock screen. You can programmatically set the level of detail visible in notifications posted by your app on a secure lock screen, or even whether the notification will show on the lock screen at all. Users can use the system settings to choose the level of detail visible in lock screen notifications, including the option to disable all lock screen notifications. Starting with Android 8.0, users can choose to disable or enable lock screen notifications for each notification channel. Figure 4. Notifications on the lock screen with sensitive content hidden To learn more, see how to Set lock screen visibility. App icon badgeIn supported launchers on devices running Android 8.0 (API level 26) and higher, app icons indicate new notifications with a colored "badge" (also known as a "notification dot") on the corresponding app launcher icon. Users can long-press on an app icon to see the notifications for that app. Users can then dismiss or act on notifications from that menu, similar to the notification drawer. Figure 5. Notification badges and the long-press menu To learn more about how badges work, read Notification badges. Wear OS devicesIf the user has a paired Wear OS device, all your notifications appear there automatically, including expandable detail and action buttons. You can also enhance the experience by customizing some appearances for the notification on wearables and provide different actions, including suggested replies and voice input replies. For more information, see how to add wearable-specific features to your notification. Figure 6. Notifications automatically appear on a paired Wear OS device Notification anatomyThe design of a notification is determined by system templates—your app simply defines the contents for each portion of the template. Some details of the notification appear only in the expanded view. Figure 7. A notification with basic details The most common parts of a notification are indicated in figure 7 as follows:
We strongly recommend using system templates to ensure proper design compatibility on all devices. If necessary, however, you can create a custom notification layout. For more information about how to create a notification with these features and more, read Create a Notification. Notification actionsAlthough it's not required, every notification should open an appropriate app activity when tapped. In addition to this default notification action, you can add action buttons that complete an app-related task from the notification (often without opening an activity), as shown in figure 9. Figure 9. A notification with action buttons Starting in Android 7.0 (API level 24), you can also add an action to reply to messages or enter other text directly from the notification. Starting in Android 10 (API level 29), the platform can automatically generate action buttons with suggested intent-based actions. Adding action buttons is explained further in Create a Notification. Require an unlocked deviceUsers might see notification actions on the device's lock screen. If a given notification action causes an app to launch an activity or send a direct reply, users must unlock the device before the app can invoke that notification action. On Android 12 (API level 31) and higher, you can configure a notification action such that the device must be unlocked in order for your app to invoke that action, no matter what workflow the action launches. This option helps add an extra layer of security to notifications on locked devices. To require a device to be unlocked before your app invokes a given notification action, pass
Expandable notificationBy default, the notification's text content is truncated to fit on one line. If you want your notification to be longer, you can enable a larger text area that's expandable by applying an additional template, as shown in figure 8. Figure 8. An expandable notification for large text You can also create an expandable notification with an image, in inbox style, a chat conversation, or media playback controls. For more information, read Create an Expandable Notification. Notification updates and groupsTo avoid bombarding your users with multiple or redundant notifications when you have additional updates, you should consider updating an existing notification rather than issuing a new one, or consider using the inbox-style notification to show conversation updates. However, if it's necessary to deliver multiple notifications, you should consider grouping those separate notifications into a group (available on Android 7.0 and higher). A notification group allows you to collapse multiple notifications into just one post in the notification drawer, with a summary. The user can then expand the notification to reveal the details for each individual notification. The user can progressively expand the notification group and each notification within it for more details. Figure 10. A collapsed and expanded notification group To learn how to add notifications to a group, see Create a Group of Notifications. Notification channelsStarting in Android 8.0 (API level 26), all notifications must be assigned to a channel or it will not appear. By categorizing notifications into channels, users can disable specific notification channels for your app (instead of disabling all your notifications), and users can control the visual and auditory options for each channel—all from the Android system settings (figure 11). Users can also long-press a notification to change behaviors for the associated channel. On devices running Android 7.1 (API level 25) and lower, users can manage notifications on a per-app basis only (effectively each app only has one channel on Android 7.1 and lower). Figure 11. Notification settings for Clock app and one of its channels One app can have multiple notification channels—a separate channel for each type of notification the app issues. An app can also create notification channels in response to choices made by users of your app. For example, you may set up separate notification channels for each conversation group created by a user in a messaging app. The channel is also where you specify the importance level for your notifications on Android 8.0 and higher. So all notifications posted to the same notification channel have the same behavior. For more information, see Create and Manage Notification Channels. Notification importanceAndroid uses the importance of a notification to determine how much the notification should interrupt the user (visually and audibly). The higher the importance of a notification, the more interruptive the notification will be. On Android 8.0 (API level 26) and above, importance of a notification is determined by the Figure 12. Users can change the importance of each channel on Android 8.0 and higher The possible importance levels are the following:
All notifications, regardless of importance, appear in non-interruptive system UI locations, such as in the notification drawer and as a badge on the launcher icon (though you can modify the appearance of the notification badge). For more information, see how to set the importance. Do Not Disturb modeStarting in Android 5.0 (API level 21), users can enable Do Not Disturb mode, which silences sounds and vibration for all notifications. Notifications still appear in the system UI as normal, unless the user specifies otherwise. There are three different levels available in Do Not Disturb mode:
Figure 13. Users can can allow notifications through based on system-wide categories (left) and based on who sent a message or who is calling (right). On Android 8.0 (API level 26) and above, users can additionally allow notifications through for app-specific categories (also known as channels) by overriding Do Not Disturb on a channel-by-channel basis. For example, a payment app might have channels for notifications related to withdrawals and deposits. The user can then choose to allow either withdrawal notifications, deposit notifications, or both when in priority mode. On devices running Android 7.1 (API level 25) and below, users can allow notifications through on an app by app basis, rather than on a channel by channel basis. To properly configure your notifications for these user settings, you must set a system-wide category and channel. Notifications for foreground servicesA notification is required when your app is running a "foreground service"—a For more information read Running a service in the foreground. And if you are building a media player, also read Using MediaStyle notifications with a foreground service. Posting limitsBeginning with Android 8.1 (API level 27), apps cannot make a notification sound more than once per second. If your app posts multiple notifications in one second, they all appear as expected, but only the first notification per second makes a sound. However, Android also applies a rate limit when updating a notification. If you post updates to a single notification too frequently (many in less than one second), the system might drop some updates. Notification compatibilitySince Android 1.0, the notification system UI and the notification-related APIs have continually evolved. To use the latest notification API features while still
supporting older devices, use the support library notification API:
The following is a summary of the most notable behavior changes for Android notifications. Android 4.1, API level 16
Android 4.4, API level 19 and 20
Android 5.0, API level 21
Android 7.0, API level 24
Android 8.0, API level 26
Android 13.0, API level 33
What does apps management notification mean?The App notifications menu allows you to customize the notifications you receive from apps. You can find the Apps notifications menu in the Notifications section of the Sound & notification menu. The Apps notifications menu will list your installed apps.
What are Google app notifications?It alerts you whenever a site or app is sending you a notification. If users accept the notifications from a website, they start getting notifications.
What is the use of notification history app?You can see your Android notification history on Android 11 through the Settings app. You first need to turn on Notification history in your phone's notification settings. You will then be able to see all the alerts you dismissed in the past 24 hours.
How do I see my Google notification history?Swipe up from the homescreen to open the app drawer menu. Find and open the Settings app (it looks like a gear icon). Open Notifications. Select Notification history.
|