# NotificationCompat

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1  
Summary:[Nested Classes](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#nestedclasses)\|[Constants](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#constants)\|[Ctors](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#)  

# NotificationCompat

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


class
NotificationCompat
`  
`

extends Object


``


`

|---|-------------------------------------------|
| java.lang.Object                             ||
| ↳ | android.support.v4.app.NotificationCompat |

<br />

*** ** * ** ***

Helper for accessing features in[Notification](https://developer.android.com/reference/android/app/Notification.html).

## Summary

|                                                                                                                                                                         ### Nested classes                                                                                                                                                                          ||
|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` class`     | [NotificationCompat.Action](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action) Structure to encapsulate a named action that can be shown as part of this notification.                                                                                                                                         |
| ` class`     | [NotificationCompat.BigPictureStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigPictureStyle) Helper class for generating large-format notifications that include a large image attachment.                                                                                                                 |
| ` class`     | [NotificationCompat.BigTextStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigTextStyle) Helper class for generating large-format notifications that include a lot of text.                                                                                                                                  |
| ` class`     | [NotificationCompat.Builder](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder) Builder class for[NotificationCompat](https://developer.android.com/reference/android/support/v4/app/NotificationCompat)objects.                                                                                              |
| ` class`     | [NotificationCompat.CarExtender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.CarExtender) <br /> Helper class to add Android Auto extensions to notifications.                                                                                                                                                  |
| ` class`     | [NotificationCompat.DecoratedCustomViewStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.DecoratedCustomViewStyle) Notification style for custom views that are decorated by the system.                                                                                                                       |
| ` interface` | [NotificationCompat.Extender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Extender) Extender interface for use with[extend(NotificationCompat.Extender)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#extend(android.support.v4.app.NotificationCompat.Extender)). |
| ` class`     | [NotificationCompat.InboxStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.InboxStyle) Helper class for generating large-format notifications that include a list of (up to 5) strings.                                                                                                                        |
| ` class`     | [NotificationCompat.MessagingStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle) Helper class for generating large-format notifications that include multiple back-and-forth messages of varying types between any number of people.                                                             |
| ` class`     | [NotificationCompat.Style](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Style) An object that can apply a rich notification style to a[Notification.CarExtender.Builder](https://developer.android.com/reference/android/app/Notification.CarExtender.Builder.html)object.                                       |
| ` class`     | [NotificationCompat.WearableExtender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.WearableExtender) Helper class to add wearable extensions to notifications.                                                                                                                                                   |

|                                                                                                                                                                                                                                                                                                                            ### Constants                                                                                                                                                                                                                                                                                                                             ||
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int`    | [BADGE_ICON_LARGE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#BADGE_ICON_LARGE) If this notification is being shown as a badge, use the icon provided to {@link Builder#setLargeIcon(Bitmap) to represent this notification.                                                                                                                                                                                                                                                                                                                                                                                        |
| `int`    | [BADGE_ICON_NONE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#BADGE_ICON_NONE) If this notification is being shown as a badge, always show as a number.                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `int`    | [BADGE_ICON_SMALL](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#BADGE_ICON_SMALL) If this notification is being shown as a badge, use the icon provided to[setSmallIcon(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setSmallIcon(int))to represent this notification.                                                                                                                                                                                                                                                                                             |
| `String` | [CATEGORY_ALARM](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_ALARM) Notification category: alarm or timer.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `String` | [CATEGORY_CALL](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_CALL) Notification category: incoming call (voice or video) or similar synchronous communication request.                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `String` | [CATEGORY_EMAIL](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_EMAIL) Notification category: asynchronous bulk message (email).                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `String` | [CATEGORY_ERROR](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_ERROR) Notification category: error in background operation or authentication status.                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `String` | [CATEGORY_EVENT](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_EVENT) Notification category: calendar event.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `String` | [CATEGORY_MESSAGE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_MESSAGE) Notification category: incoming direct message (SMS, instant message, etc.).                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `String` | [CATEGORY_PROGRESS](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_PROGRESS) Notification category: progress of a long-running background operation.                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `String` | [CATEGORY_PROMO](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_PROMO) Notification category: promotion or advertisement.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `String` | [CATEGORY_RECOMMENDATION](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_RECOMMENDATION) Notification category: a specific, timely recommendation for a single thing.                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `String` | [CATEGORY_REMINDER](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_REMINDER) Notification category: user-scheduled reminder.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `String` | [CATEGORY_SERVICE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_SERVICE) Notification category: indication of running background service.                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `String` | [CATEGORY_SOCIAL](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_SOCIAL) Notification category: social network or sharing update.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `String` | [CATEGORY_STATUS](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_STATUS) Notification category: ongoing information about device or contextual status.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `String` | [CATEGORY_SYSTEM](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_SYSTEM) Notification category: system or device status update.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `String` | [CATEGORY_TRANSPORT](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#CATEGORY_TRANSPORT) Notification category: media transport control for playback.                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `int`    | [COLOR_DEFAULT](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#COLOR_DEFAULT) Value of[color](https://developer.android.com/reference/android/app/Notification.html#color)equal to 0 (also known as[Color.TRANSPARENT](https://developer.android.com/reference/android/graphics/Color.html#TRANSPARENT)), telling the system not to decorate this notification with any special color but instead use default colors when presenting this notification.                                                                                                                                                                 |
| `int`    | [DEFAULT_ALL](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#DEFAULT_ALL) Use all default values (where applicable).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `int`    | [DEFAULT_LIGHTS](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#DEFAULT_LIGHTS) Use the default notification lights.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `int`    | [DEFAULT_SOUND](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#DEFAULT_SOUND) Use the default notification sound.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `int`    | [DEFAULT_VIBRATE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#DEFAULT_VIBRATE) Use the default notification vibrate.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `String` | [EXTRA_AUDIO_CONTENTS_URI](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_AUDIO_CONTENTS_URI) Keys into the[getExtras(Notification)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getExtras(android.app.Notification))Bundle: the audio contents of this notification.                                                                                                                                                                                                                                                                                                       |
| `String` | [EXTRA_BACKGROUND_IMAGE_URI](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_BACKGROUND_IMAGE_URI) Notification extras key: A[content URI](https://developer.android.com/reference/android/content/ContentUris.html)pointing to an image that can be displayed in the background when the notification is selected.                                                                                                                                                                                                                                                                                                |
| `String` | [EXTRA_BIG_TEXT](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_BIG_TEXT) Notification extras key: this is the longer text shown in the big form of a[NotificationCompat.BigTextStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigTextStyle)notification, as supplied to[bigText(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigTextStyle#bigText(java.lang.CharSequence)).                                                                                                                                        |
| `String` | [EXTRA_COMPACT_ACTIONS](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_COMPACT_ACTIONS) Notification extras key: the indices of actions to be shown in the compact view, as supplied to (e.g.)[setShowActionsInCompactView(int)](https://developer.android.com/reference/android/app/Notification.MediaStyle.html#setShowActionsInCompactView(int...)).                                                                                                                                                                                                                                                           |
| `String` | [EXTRA_CONVERSATION_TITLE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_CONVERSATION_TITLE) Notification key: a[String](https://developer.android.com/reference/java/lang/String)to be displayed as the title to a conversation represented by a[NotificationCompat.MessagingStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle)                                                                                                                                                                                                                           |
| `String` | [EXTRA_INFO_TEXT](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_INFO_TEXT) Notification extras key: this is a small piece of additional text as supplied to[setContentInfo(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setContentInfo(java.lang.CharSequence)).                                                                                                                                                                                                                                                                                     |
| `String` | [EXTRA_IS_GROUP_CONVERSATION](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_IS_GROUP_CONVERSATION) Notification key: whether the[NotificationCompat.MessagingStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle)notification represents a group conversation.                                                                                                                                                                                                                                                                                               |
| `String` | [EXTRA_LARGE_ICON](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_LARGE_ICON) Notification extras key: this is a bitmap to be used instead of the small icon when showing the notification payload, as supplied to[setLargeIcon(android.graphics.Bitmap)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setLargeIcon(android.graphics.Bitmap)).                                                                                                                                                                                                                       |
| `String` | [EXTRA_LARGE_ICON_BIG](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_LARGE_ICON_BIG) Notification extras key: this is a bitmap to be used instead of the one from[setLargeIcon(android.graphics.Bitmap)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setLargeIcon(android.graphics.Bitmap))when the notification is shown in its expanded form, as supplied to[bigLargeIcon(android.graphics.Bitmap)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigPictureStyle#bigLargeIcon(android.graphics.Bitmap)).                    |
| `String` | [EXTRA_MEDIA_SESSION](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_MEDIA_SESSION) Notification key: A[MediaSession.Token](https://developer.android.com/reference/android/media/session/MediaSession.Token.html)associated with a[Notification.MediaStyle](https://developer.android.com/reference/android/app/Notification.MediaStyle.html)notification.                                                                                                                                                                                                                                                       |
| `String` | [EXTRA_MESSAGES](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_MESSAGES) Notification key: an array of[Bundle](https://developer.android.com/reference/android/os/Bundle.html)objects representing[NotificationCompat.MessagingStyle.Message](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle.Message)objects for a[NotificationCompat.MessagingStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle)notification.                                                                                           |
| `String` | [EXTRA_PEOPLE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_PEOPLE) Notification extras key: A String array containing the people that this notification relates to, each of which was supplied to[addPerson(String)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#addPerson(java.lang.String)).                                                                                                                                                                                                                                                                   |
| `String` | [EXTRA_PICTURE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_PICTURE) Notification extras key: this is a bitmap to be shown in[NotificationCompat.BigPictureStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigPictureStyle)expanded notifications, supplied to[bigPicture(android.graphics.Bitmap)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigPictureStyle#bigPicture(android.graphics.Bitmap)).                                                                                                                           |
| `String` | [EXTRA_PROGRESS](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_PROGRESS) Notification extras key: this is the progress value supplied to[setProgress(int, int, boolean)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setProgress(int, int, boolean)).                                                                                                                                                                                                                                                                                                              |
| `String` | [EXTRA_PROGRESS_INDETERMINATE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_PROGRESS_INDETERMINATE) Notification extras key: whether the progress bar is indeterminate, supplied to[setProgress(int, int, boolean)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setProgress(int, int, boolean)).                                                                                                                                                                                                                                                                  |
| `String` | [EXTRA_PROGRESS_MAX](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_PROGRESS_MAX) Notification extras key: this is the maximum value supplied to[setProgress(int, int, boolean)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setProgress(int, int, boolean)).                                                                                                                                                                                                                                                                                                       |
| `String` | [EXTRA_REMOTE_INPUT_HISTORY](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_REMOTE_INPUT_HISTORY) Notification extras key: this is the remote input history, as supplied to[setRemoteInputHistory(CharSequence[])](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setRemoteInputHistory(java.lang.CharSequence[])).                                                                                                                                                                                                                                                    |
| `String` | [EXTRA_SELF_DISPLAY_NAME](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_SELF_DISPLAY_NAME) Notification key: the username to be displayed for all messages sent by the user including direct replies[NotificationCompat.MessagingStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle)notification.                                                                                                                                                                                                                                                           |
| `String` | [EXTRA_SHOW_CHRONOMETER](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_SHOW_CHRONOMETER) Notification extras key: whether the when field set using[setWhen(long)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setWhen(long))should be shown as a count-up timer (specifically a[Chronometer](https://developer.android.com/reference/android/widget/Chronometer.html)) instead of a timestamp, as supplied to[setUsesChronometer(boolean)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setUsesChronometer(boolean)). |
| `String` | [EXTRA_SHOW_WHEN](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_SHOW_WHEN) Notification extras key: whether the when field set using[setWhen(long)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setWhen(long))should be shown, as supplied to[setShowWhen(boolean)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setShowWhen(boolean)).                                                                                                                                                                               |
| `String` | [EXTRA_SMALL_ICON](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_SMALL_ICON) Notification extras key: this is the resource ID of the notification's main small icon, as supplied to[setSmallIcon(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setSmallIcon(int)).                                                                                                                                                                                                                                                                                             |
| `String` | [EXTRA_SUB_TEXT](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_SUB_TEXT) Notification extras key: this is a third line of text, as supplied to[setSubText(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setSubText(java.lang.CharSequence)).                                                                                                                                                                                                                                                                                                          |
| `String` | [EXTRA_SUMMARY_TEXT](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_SUMMARY_TEXT) Notification extras key: this is a line of summary information intended to be shown alongside expanded notifications, as supplied to (e.g.)[setSummaryText(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigTextStyle#setSummaryText(java.lang.CharSequence)).                                                                                                                                                                                                               |
| `String` | [EXTRA_TEMPLATE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_TEMPLATE) Notification extras key: A string representing the name of the specific[Notification.Style](https://developer.android.com/reference/android/app/Notification.Style.html)used to create this notification.                                                                                                                                                                                                                                                                                                                               |
| `String` | [EXTRA_TEXT](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_TEXT) Notification extras key: this is the main text payload, as supplied to[setContentText(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setContentText(java.lang.CharSequence)).                                                                                                                                                                                                                                                                                                         |
| `String` | [EXTRA_TEXT_LINES](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_TEXT_LINES) Notification extras key: An array of CharSequences to show in[NotificationCompat.InboxStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.InboxStyle)expanded notifications, each of which was supplied to[addLine(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.InboxStyle#addLine(java.lang.CharSequence)).                                                                                                                               |
| `String` | [EXTRA_TITLE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_TITLE) Notification extras key: this is the title of the notification, as supplied to[setContentTitle(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setContentTitle(java.lang.CharSequence)).                                                                                                                                                                                                                                                                                             |
| `String` | [EXTRA_TITLE_BIG](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#EXTRA_TITLE_BIG) Notification extras key: this is the title of the notification when shown in expanded form, e.g.                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `int`    | [FLAG_AUTO_CANCEL](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#FLAG_AUTO_CANCEL) Bit set in the Notification flags field if the notification should be canceled when it is clicked by the user.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `int`    | [FLAG_FOREGROUND_SERVICE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#FLAG_FOREGROUND_SERVICE) Bit set in the Notification flags field if this notification represents a currently running service.                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `int`    | [FLAG_GROUP_SUMMARY](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#FLAG_GROUP_SUMMARY) Bit set in the Notification flags field if this notification is the group summary for a group of notifications.                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `int`    | [FLAG_HIGH_PRIORITY](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#FLAG_HIGH_PRIORITY) *This constant was deprecated in API level 22.1.0. Use[setPriority(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setPriority(int))with a positive value.*                                                                                                                                                                                                                                                                                                                     |
| `int`    | [FLAG_INSISTENT](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#FLAG_INSISTENT) Bit set in the Notification flags field if the audio will be repeated until the notification is cancelled or the notification window is opened.                                                                                                                                                                                                                                                                                                                                                                                         |
| `int`    | [FLAG_LOCAL_ONLY](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#FLAG_LOCAL_ONLY) Bit set in the Notification flags field if this notification is relevant to the current device only and it is not recommended that it bridge to other devices.                                                                                                                                                                                                                                                                                                                                                                        |
| `int`    | [FLAG_NO_CLEAR](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#FLAG_NO_CLEAR) Bit set in the Notification flags field if the notification should not be canceled when the user clicks the Clear all button.                                                                                                                                                                                                                                                                                                                                                                                                             |
| `int`    | [FLAG_ONGOING_EVENT](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#FLAG_ONGOING_EVENT) Bit set in the Notification flags field if this notification is in reference to something that is ongoing, like a phone call.                                                                                                                                                                                                                                                                                                                                                                                                   |
| `int`    | [FLAG_ONLY_ALERT_ONCE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#FLAG_ONLY_ALERT_ONCE) Bit set in the Notification flags field if the notification's sound, vibrate and ticker should only be played if the notification is not already showing.                                                                                                                                                                                                                                                                                                                                                                   |
| `int`    | [FLAG_SHOW_LIGHTS](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#FLAG_SHOW_LIGHTS) Bit set in the Notification flags field when LEDs should be turned on for this notification.                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `int`    | [GROUP_ALERT_ALL](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#GROUP_ALERT_ALL) Constant for[setGroupAlertBehavior(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setGroupAlertBehavior(int)), meaning that all notifications in a group with sound or vibration ought to make sound or vibrate (respectively), so this notification will not be muted when it is in a group.                                                                                                                                                                                        |
| `int`    | [GROUP_ALERT_CHILDREN](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#GROUP_ALERT_CHILDREN) Constant for[setGroupAlertBehavior(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setGroupAlertBehavior(int)), meaning that the summary notification in a group should be silenced (no sound or vibration) even if they would otherwise make sound or vibrate.                                                                                                                                                                                                             |
| `int`    | [GROUP_ALERT_SUMMARY](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#GROUP_ALERT_SUMMARY) Constant for[setGroupAlertBehavior(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setGroupAlertBehavior(int)), meaning that all children notification in a group should be silenced (no sound or vibration) even if they would otherwise make sound or vibrate.                                                                                                                                                                                                              |
| `int`    | [PRIORITY_DEFAULT](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#PRIORITY_DEFAULT) Default notification priority for[setPriority(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setPriority(int)).                                                                                                                                                                                                                                                                                                                                                                    |
| `int`    | [PRIORITY_HIGH](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#PRIORITY_HIGH) Higher notification priority for[setPriority(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setPriority(int)), for more important notifications or alerts.                                                                                                                                                                                                                                                                                                                               |
| `int`    | [PRIORITY_LOW](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#PRIORITY_LOW) Lower notification priority for[setPriority(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setPriority(int)), for items that are less important.                                                                                                                                                                                                                                                                                                                                           |
| `int`    | [PRIORITY_MAX](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#PRIORITY_MAX) Highest notification priority for[setPriority(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setPriority(int)), for your application's most important items that require the user's prompt attention or input.                                                                                                                                                                                                                                                                             |
| `int`    | [PRIORITY_MIN](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#PRIORITY_MIN) Lowest notification priority for[setPriority(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setPriority(int)); these items might not be shown to the user except under special circumstances, such as detailed notification logs.                                                                                                                                                                                                                                                          |
| `int`    | [STREAM_DEFAULT](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#STREAM_DEFAULT) Use this constant as the value for audioStreamType to request that the default stream type for notifications be used.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `int`    | [VISIBILITY_PRIVATE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#VISIBILITY_PRIVATE) Notification visibility: Show this notification on all lockscreens, but conceal sensitive or private information on secure lockscreens.                                                                                                                                                                                                                                                                                                                                                                                         |
| `int`    | [VISIBILITY_PUBLIC](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#VISIBILITY_PUBLIC) Notification visibility: Show this notification in its entirety on all lockscreens.                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `int`    | [VISIBILITY_SECRET](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#VISIBILITY_SECRET) Notification visibility: Do not reveal any part of this notification on a secure lockscreen.                                                                                                                                                                                                                                                                                                                                                                                                                                      |

|                                                         ### Public constructors                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[NotificationCompat](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#NotificationCompat())`() ` |

|                                                                                                                                                                                                                                                                     ### Public methods                                                                                                                                                                                                                                                                      ||
|-----------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static `[NotificationCompat.Action](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action)         | ` `[getAction](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getAction(android.app.Notification, int))`(`[Notification](https://developer.android.com/reference/android/app/Notification.html)` notification, int actionIndex) ` Get an action on this notification in a backwards compatible manner.                                                                          |
| ` static int`                                                                                                                           | ` `[getActionCount](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getActionCount(android.app.Notification))`(`[Notification](https://developer.android.com/reference/android/app/Notification.html)` notification) ` Get the number of actions in this notification in a backwards compatible manner.                                                                          |
| ` static int`                                                                                                                           | ` `[getBadgeIconType](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getBadgeIconType(android.app.Notification))`(`[Notification](https://developer.android.com/reference/android/app/Notification.html)` notification) ` Returns what icon should be shown for this notification if it is being displayed in a Launcher that supports badging.                                 |
| ` static String`                                                                                                                        | ` `[getCategory](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getCategory(android.app.Notification))`(`[Notification](https://developer.android.com/reference/android/app/Notification.html)` notification) ` Get the category of this notification in a backwards compatible manner.                                                                                         |
| ` static String`                                                                                                                        | ` `[getChannelId](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getChannelId(android.app.Notification))`(`[Notification](https://developer.android.com/reference/android/app/Notification.html)` notification) `                                                                                                                                                               |
| ` static `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)                                                      | ` `[getExtras](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getExtras(android.app.Notification))`(`[Notification](https://developer.android.com/reference/android/app/Notification.html)` notification) ` Gets the[extras](https://developer.android.com/reference/android/app/Notification.html#extras)field from a notification in a backwards compatible manner.           |
| ` static String`                                                                                                                        | ` `[getGroup](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getGroup(android.app.Notification))`(`[Notification](https://developer.android.com/reference/android/app/Notification.html)` notification) ` Get the key used to group this notification into a cluster or stack with other notifications on devices which support such rendering.                                 |
| ` static int`                                                                                                                           | ` `[getGroupAlertBehavior](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getGroupAlertBehavior(android.app.Notification))`(`[Notification](https://developer.android.com/reference/android/app/Notification.html)` notification) ` Returns which type of notifications in a group are responsible for audibly alerting the user.                                               |
| ` static List<`[NotificationCompat.Action](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action)`>` | ` `[getInvisibleActions](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getInvisibleActions(android.app.Notification))`(`[Notification](https://developer.android.com/reference/android/app/Notification.html)` notification) ` Returns the invisible actions contained within the given notification.                                                                          |
| ` static boolean`                                                                                                                       | ` `[getLocalOnly](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getLocalOnly(android.app.Notification))`(`[Notification](https://developer.android.com/reference/android/app/Notification.html)` notification) ` Get whether or not this notification is only relevant to the current device.                                                                                  |
| ` static String`                                                                                                                        | ` `[getShortcutId](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getShortcutId(android.app.Notification))`(`[Notification](https://developer.android.com/reference/android/app/Notification.html)` notification) ` Returns the[id](https://developer.android.com/reference/android/support/v4/content/pm/ShortcutInfoCompat#getId())that this notification supersedes, if any. |
| ` static String`                                                                                                                        | ` `[getSortKey](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getSortKey(android.app.Notification))`(`[Notification](https://developer.android.com/reference/android/app/Notification.html)` notification) ` Get a sort key that orders this notification among other notifications from the same package.                                                                     |
| ` static long`                                                                                                                          | ` `[getTimeoutAfter](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getTimeoutAfter(android.app.Notification))`(`[Notification](https://developer.android.com/reference/android/app/Notification.html)` notification) ` Returns the time at which this notification should be canceled by the system, if it's not canceled already.                                             |
| ` static boolean`                                                                                                                       | ` `[isGroupSummary](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#isGroupSummary(android.app.Notification))`(`[Notification](https://developer.android.com/reference/android/app/Notification.html)` notification) ` Get whether this notification to be the group summary for a group of notifications.                                                                       |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Constants

### BADGE_ICON_LARGE

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int BADGE_ICON_LARGE
```

If this notification is being shown as a badge, use the icon provided to {@link Builder#setLargeIcon(Bitmap) to represent this notification.

<br />

Constant Value: 2 (0x00000002)  

### BADGE_ICON_NONE

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int BADGE_ICON_NONE
```

If this notification is being shown as a badge, always show as a number.

<br />

Constant Value: 0 (0x00000000)  

### BADGE_ICON_SMALL

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int BADGE_ICON_SMALL
```

If this notification is being shown as a badge, use the icon provided to[setSmallIcon(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setSmallIcon(int))to represent this notification.

<br />

Constant Value: 1 (0x00000001)  

### CATEGORY_ALARM

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_ALARM
```

Notification category: alarm or timer.

<br />

Constant Value: "alarm"  

### CATEGORY_CALL

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_CALL
```

Notification category: incoming call (voice or video) or similar synchronous communication request.

<br />

Constant Value: "call"  

### CATEGORY_EMAIL

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_EMAIL
```

Notification category: asynchronous bulk message (email).

<br />

Constant Value: "email"  

### CATEGORY_ERROR

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_ERROR
```

Notification category: error in background operation or authentication status.

<br />

Constant Value: "err"  

### CATEGORY_EVENT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_EVENT
```

Notification category: calendar event.

<br />

Constant Value: "event"  

### CATEGORY_MESSAGE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_MESSAGE
```

Notification category: incoming direct message (SMS, instant message, etc.).

<br />

Constant Value: "msg"  

### CATEGORY_PROGRESS

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_PROGRESS
```

Notification category: progress of a long-running background operation.

<br />

Constant Value: "progress"  

### CATEGORY_PROMO

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_PROMO
```

Notification category: promotion or advertisement.

<br />

Constant Value: "promo"  

### CATEGORY_RECOMMENDATION

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_RECOMMENDATION
```

Notification category: a specific, timely recommendation for a single thing. For example, a news app might want to recommend a news story it believes the user will want to read next.

<br />

Constant Value: "recommendation"  

### CATEGORY_REMINDER

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_REMINDER
```

Notification category: user-scheduled reminder.

<br />

Constant Value: "reminder"  

### CATEGORY_SERVICE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_SERVICE
```

Notification category: indication of running background service.

<br />

Constant Value: "service"  

### CATEGORY_SOCIAL

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_SOCIAL
```

Notification category: social network or sharing update.

<br />

Constant Value: "social"  

### CATEGORY_STATUS

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_STATUS
```

Notification category: ongoing information about device or contextual status.

<br />

Constant Value: "status"  

### CATEGORY_SYSTEM

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_SYSTEM
```

Notification category: system or device status update. Reserved for system use.

<br />

Constant Value: "sys"  

### CATEGORY_TRANSPORT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String CATEGORY_TRANSPORT
```

Notification category: media transport control for playback.

<br />

Constant Value: "transport"  

### COLOR_DEFAULT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int COLOR_DEFAULT
```

Value of[color](https://developer.android.com/reference/android/app/Notification.html#color)equal to 0 (also known as[Color.TRANSPARENT](https://developer.android.com/reference/android/graphics/Color.html#TRANSPARENT)), telling the system not to decorate this notification with any special color but instead use default colors when presenting this notification.

<br />

Constant Value: 0 (0x00000000)  

### DEFAULT_ALL

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int DEFAULT_ALL
```

Use all default values (where applicable).

<br />

Constant Value: -1 (0xffffffff)  

### DEFAULT_LIGHTS

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int DEFAULT_LIGHTS
```

Use the default notification lights. This will ignore the[FLAG_SHOW_LIGHTS](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#FLAG_SHOW_LIGHTS)bit, and values set with[setLights(int, int, int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setLights(int, int, int)).

<br />

**See also:**

- [setDefaults(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setDefaults(int))

Constant Value: 4 (0x00000004)  

### DEFAULT_SOUND

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int DEFAULT_SOUND
```

Use the default notification sound. This will ignore any sound set using[setSound(Uri)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setSound(android.net.Uri))

A notification that is noisy is more likely to be presented as a heads-up notification, on some platforms.

<br />

<br />

**See also:**

- [setDefaults(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setDefaults(int))

Constant Value: 1 (0x00000001)  

### DEFAULT_VIBRATE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int DEFAULT_VIBRATE
```

Use the default notification vibrate. This will ignore any vibrate set using[setVibrate(long[])](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setVibrate(long[])). Using phone vibration requires the[VIBRATE](https://developer.android.com/reference/android/Manifest.permission#VIBRATE)permission.

A notification that vibrates is more likely to be presented as a heads-up notification, on some platforms.

<br />

<br />

**See also:**

- [setDefaults(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setDefaults(int))

Constant Value: 2 (0x00000002)  

### EXTRA_AUDIO_CONTENTS_URI

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_AUDIO_CONTENTS_URI
```

Keys into the[getExtras(Notification)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#getExtras(android.app.Notification))Bundle: the audio contents of this notification. This is for use when rendering the notification on an audio-focused interface; the audio contents are a complete sound sample that contains the contents/body of the notification. This may be used in substitute of a Text-to-Speech reading of the notification. For example if the notification represents a voice message this should point to the audio of that message. The data stored under this key should be a String representation of a Uri that contains the audio contents in one of the following formats: WAV, PCM 16-bit, AMR-WB. This extra is unnecessary if you are using`MessagingStyle`since each`Message`has a field for holding data URI. That field can be used for audio. See`Message#setData`. Example usage:  

     NotificationCompat.Builder myBuilder = (build your Notification as normal);
     myBuilder.getExtras().putString(EXTRA_AUDIO_CONTENTS_URI, myAudioUri.toString());
     
     
<br />

<br />

Constant Value: "android.audioContents"  

### EXTRA_BACKGROUND_IMAGE_URI

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_BACKGROUND_IMAGE_URI
```

Notification extras key: A[content URI](https://developer.android.com/reference/android/content/ContentUris.html)pointing to an image that can be displayed in the background when the notification is selected. The URI must point to an image stream suitable for passing into[BitmapFactory.decodeStream](https://developer.android.com/reference/android/graphics/BitmapFactory.html#decodeStream(java.io.InputStream)); all other content types will be ignored. The content provider URI used for this purpose must require no permissions to read the image data.

<br />

Constant Value: "android.backgroundImageUri"  

### EXTRA_BIG_TEXT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_BIG_TEXT
```

Notification extras key: this is the longer text shown in the big form of a[NotificationCompat.BigTextStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigTextStyle)notification, as supplied to[bigText(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigTextStyle#bigText(java.lang.CharSequence)).

<br />

Constant Value: "android.bigText"  

### EXTRA_COMPACT_ACTIONS

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_COMPACT_ACTIONS
```

Notification extras key: the indices of actions to be shown in the compact view, as supplied to (e.g.)[setShowActionsInCompactView(int)](https://developer.android.com/reference/android/app/Notification.MediaStyle.html#setShowActionsInCompactView(int...)).

<br />

Constant Value: "android.compactActions"  

### EXTRA_CONVERSATION_TITLE

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_CONVERSATION_TITLE
```

Notification key: a[String](https://developer.android.com/reference/java/lang/String)to be displayed as the title to a conversation represented by a[NotificationCompat.MessagingStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle)

<br />

Constant Value: "android.conversationTitle"  

### EXTRA_INFO_TEXT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_INFO_TEXT
```

Notification extras key: this is a small piece of additional text as supplied to[setContentInfo(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setContentInfo(java.lang.CharSequence)).

<br />

Constant Value: "android.infoText"  

### EXTRA_IS_GROUP_CONVERSATION

```
String EXTRA_IS_GROUP_CONVERSATION
```

Notification key: whether the[NotificationCompat.MessagingStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle)notification represents a group conversation.

<br />

Constant Value: "android.isGroupConversation"  

### EXTRA_LARGE_ICON

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_LARGE_ICON
```

Notification extras key: this is a bitmap to be used instead of the small icon when showing the notification payload, as supplied to[setLargeIcon(android.graphics.Bitmap)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setLargeIcon(android.graphics.Bitmap)).

<br />

Constant Value: "android.largeIcon"  

### EXTRA_LARGE_ICON_BIG

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_LARGE_ICON_BIG
```

Notification extras key: this is a bitmap to be used instead of the one from[setLargeIcon(android.graphics.Bitmap)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setLargeIcon(android.graphics.Bitmap))when the notification is shown in its expanded form, as supplied to[bigLargeIcon(android.graphics.Bitmap)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigPictureStyle#bigLargeIcon(android.graphics.Bitmap)).

<br />

Constant Value: "android.largeIcon.big"  

### EXTRA_MEDIA_SESSION

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_MEDIA_SESSION
```

Notification key: A[MediaSession.Token](https://developer.android.com/reference/android/media/session/MediaSession.Token.html)associated with a[Notification.MediaStyle](https://developer.android.com/reference/android/app/Notification.MediaStyle.html)notification.

<br />

Constant Value: "android.mediaSession"  

### EXTRA_MESSAGES

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_MESSAGES
```

Notification key: an array of[Bundle](https://developer.android.com/reference/android/os/Bundle.html)objects representing[NotificationCompat.MessagingStyle.Message](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle.Message)objects for a[NotificationCompat.MessagingStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle)notification.

<br />

Constant Value: "android.messages"  

### EXTRA_PEOPLE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_PEOPLE
```

Notification extras key: A String array containing the people that this notification relates to, each of which was supplied to[addPerson(String)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#addPerson(java.lang.String)).

<br />

Constant Value: "android.people"  

### EXTRA_PICTURE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_PICTURE
```

Notification extras key: this is a bitmap to be shown in[NotificationCompat.BigPictureStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigPictureStyle)expanded notifications, supplied to[bigPicture(android.graphics.Bitmap)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigPictureStyle#bigPicture(android.graphics.Bitmap)).

<br />

Constant Value: "android.picture"  

### EXTRA_PROGRESS

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_PROGRESS
```

Notification extras key: this is the progress value supplied to[setProgress(int, int, boolean)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setProgress(int, int, boolean)).

<br />

Constant Value: "android.progress"  

### EXTRA_PROGRESS_INDETERMINATE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_PROGRESS_INDETERMINATE
```

Notification extras key: whether the progress bar is indeterminate, supplied to[setProgress(int, int, boolean)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setProgress(int, int, boolean)).

<br />

Constant Value: "android.progressIndeterminate"  

### EXTRA_PROGRESS_MAX

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_PROGRESS_MAX
```

Notification extras key: this is the maximum value supplied to[setProgress(int, int, boolean)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setProgress(int, int, boolean)).

<br />

Constant Value: "android.progressMax"  

### EXTRA_REMOTE_INPUT_HISTORY

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_REMOTE_INPUT_HISTORY
```

Notification extras key: this is the remote input history, as supplied to[setRemoteInputHistory(CharSequence[])](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setRemoteInputHistory(java.lang.CharSequence[])). Apps can fill this through[setRemoteInputHistory(CharSequence[])](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setRemoteInputHistory(java.lang.CharSequence[]))with the most recent inputs that have been sent through a[RemoteInput](https://developer.android.com/reference/android/support/v4/app/RemoteInput)of this Notification and are expected to clear it once the it is no longer relevant (e.g. for chat notifications once the other party has responded). The extra with this key is of type CharSequence\[\] and contains the most recent entry at the 0 index, the second most recent at the 1 index, etc.

<br />

**See also:**

- [setRemoteInputHistory(CharSequence[])](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setRemoteInputHistory(java.lang.CharSequence[]))

Constant Value: "android.remoteInputHistory"  

### EXTRA_SELF_DISPLAY_NAME

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_SELF_DISPLAY_NAME
```

Notification key: the username to be displayed for all messages sent by the user including direct replies[NotificationCompat.MessagingStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle)notification.

<br />

Constant Value: "android.selfDisplayName"  

### EXTRA_SHOW_CHRONOMETER

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_SHOW_CHRONOMETER
```

Notification extras key: whether the when field set using[setWhen(long)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setWhen(long))should be shown as a count-up timer (specifically a[Chronometer](https://developer.android.com/reference/android/widget/Chronometer.html)) instead of a timestamp, as supplied to[setUsesChronometer(boolean)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setUsesChronometer(boolean)).

<br />

Constant Value: "android.showChronometer"  

### EXTRA_SHOW_WHEN

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_SHOW_WHEN
```

Notification extras key: whether the when field set using[setWhen(long)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setWhen(long))should be shown, as supplied to[setShowWhen(boolean)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setShowWhen(boolean)).

<br />

Constant Value: "android.showWhen"  

### EXTRA_SMALL_ICON

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_SMALL_ICON
```

Notification extras key: this is the resource ID of the notification's main small icon, as supplied to[setSmallIcon(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setSmallIcon(int)).

<br />

Constant Value: "android.icon"  

### EXTRA_SUB_TEXT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_SUB_TEXT
```

Notification extras key: this is a third line of text, as supplied to[setSubText(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setSubText(java.lang.CharSequence)).

<br />

Constant Value: "android.subText"  

### EXTRA_SUMMARY_TEXT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_SUMMARY_TEXT
```

Notification extras key: this is a line of summary information intended to be shown alongside expanded notifications, as supplied to (e.g.)[setSummaryText(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigTextStyle#setSummaryText(java.lang.CharSequence)).

<br />

Constant Value: "android.summaryText"  

### EXTRA_TEMPLATE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_TEMPLATE
```

Notification extras key: A string representing the name of the specific[Notification.Style](https://developer.android.com/reference/android/app/Notification.Style.html)used to create this notification.

<br />

Constant Value: "android.template"  

### EXTRA_TEXT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_TEXT
```

Notification extras key: this is the main text payload, as supplied to[setContentText(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setContentText(java.lang.CharSequence)).

<br />

Constant Value: "android.text"  

### EXTRA_TEXT_LINES

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_TEXT_LINES
```

Notification extras key: An array of CharSequences to show in[NotificationCompat.InboxStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.InboxStyle)expanded notifications, each of which was supplied to[addLine(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.InboxStyle#addLine(java.lang.CharSequence)).

<br />

Constant Value: "android.textLines"  

### EXTRA_TITLE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_TITLE
```

Notification extras key: this is the title of the notification, as supplied to[setContentTitle(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setContentTitle(java.lang.CharSequence)).

<br />

Constant Value: "android.title"  

### EXTRA_TITLE_BIG

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String EXTRA_TITLE_BIG
```

Notification extras key: this is the title of the notification when shown in expanded form, e.g. as supplied to[setBigContentTitle(CharSequence)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigTextStyle#setBigContentTitle(java.lang.CharSequence)).

<br />

Constant Value: "android.title.big"  

### FLAG_AUTO_CANCEL

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int FLAG_AUTO_CANCEL
```

Bit set in the Notification flags field if the notification should be canceled when it is clicked by the user.

<br />

Constant Value: 16 (0x00000010)  

### FLAG_FOREGROUND_SERVICE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int FLAG_FOREGROUND_SERVICE
```

Bit set in the Notification flags field if this notification represents a currently running service. This will normally be set for you by[startForeground(int, Notification)](https://developer.android.com/reference/android/app/Service.html#startForeground(int, android.app.Notification)).

<br />

Constant Value: 64 (0x00000040)  

### FLAG_GROUP_SUMMARY

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int FLAG_GROUP_SUMMARY
```

Bit set in the Notification flags field if this notification is the group summary for a group of notifications. Grouped notifications may display in a cluster or stack on devices which support such rendering. Requires a group key also be set using[setGroup(String)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setGroup(java.lang.String)).

<br />

Constant Value: 512 (0x00000200)  

### FLAG_HIGH_PRIORITY

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int FLAG_HIGH_PRIORITY
```

<br />

**This constant was deprecated in API level 22.1.0.**   
Use[setPriority(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setPriority(int))with a positive value.

Obsolete flag indicating high-priority notifications; use the priority field instead.

<br />

Constant Value: 128 (0x00000080)  

### FLAG_INSISTENT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int FLAG_INSISTENT
```

Bit set in the Notification flags field if the audio will be repeated until the notification is cancelled or the notification window is opened.

<br />

Constant Value: 4 (0x00000004)  

### FLAG_LOCAL_ONLY

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int FLAG_LOCAL_ONLY
```

Bit set in the Notification flags field if this notification is relevant to the current device only and it is not recommended that it bridge to other devices.

<br />

Constant Value: 256 (0x00000100)  

### FLAG_NO_CLEAR

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int FLAG_NO_CLEAR
```

Bit set in the Notification flags field if the notification should not be canceled when the user clicks the Clear all button.

<br />

Constant Value: 32 (0x00000020)  

### FLAG_ONGOING_EVENT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int FLAG_ONGOING_EVENT
```

Bit set in the Notification flags field if this notification is in reference to something that is ongoing, like a phone call. It should not be set if this notification is in reference to something that happened at a particular point in time, like a missed phone call.

<br />

Constant Value: 2 (0x00000002)  

### FLAG_ONLY_ALERT_ONCE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int FLAG_ONLY_ALERT_ONCE
```

Bit set in the Notification flags field if the notification's sound, vibrate and ticker should only be played if the notification is not already showing.

<br />

Constant Value: 8 (0x00000008)  

### FLAG_SHOW_LIGHTS

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int FLAG_SHOW_LIGHTS
```

Bit set in the Notification flags field when LEDs should be turned on for this notification.

<br />

Constant Value: 1 (0x00000001)  

### GROUP_ALERT_ALL

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int GROUP_ALERT_ALL
```

Constant for[setGroupAlertBehavior(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setGroupAlertBehavior(int)), meaning that all notifications in a group with sound or vibration ought to make sound or vibrate (respectively), so this notification will not be muted when it is in a group.

<br />

Constant Value: 0 (0x00000000)  

### GROUP_ALERT_CHILDREN

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int GROUP_ALERT_CHILDREN
```

Constant for[setGroupAlertBehavior(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setGroupAlertBehavior(int)), meaning that the summary notification in a group should be silenced (no sound or vibration) even if they would otherwise make sound or vibrate. Use this constant to mute this notification if this notification is a group summary.

For example, you might want to use this constant if only the children notifications in your group have content and the summary is only used to visually group notifications rather than to alert the user that new information is available.

<br />

Constant Value: 2 (0x00000002)  

### GROUP_ALERT_SUMMARY

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int GROUP_ALERT_SUMMARY
```

Constant for[setGroupAlertBehavior(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setGroupAlertBehavior(int)), meaning that all children notification in a group should be silenced (no sound or vibration) even if they would otherwise make sound or vibrate. Use this constant to mute this notification if this notification is a group child. This must be applied to all children notifications you want to mute.

For example, you might want to use this constant if you post a number of children notifications at once (say, after a periodic sync), and only need to notify the user audibly once.

<br />

Constant Value: 1 (0x00000001)  

### PRIORITY_DEFAULT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int PRIORITY_DEFAULT
```

Default notification priority for[setPriority(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setPriority(int)). If your application does not prioritize its own notifications, use this value for all notifications.

<br />

Constant Value: 0 (0x00000000)  

### PRIORITY_HIGH

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int PRIORITY_HIGH
```

Higher notification priority for[setPriority(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setPriority(int)), for more important notifications or alerts. The UI may choose to show these items larger, or at a different position in notification lists, compared with your app's[PRIORITY_DEFAULT](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#PRIORITY_DEFAULT)items.

<br />

Constant Value: 1 (0x00000001)  

### PRIORITY_LOW

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int PRIORITY_LOW
```

Lower notification priority for[setPriority(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setPriority(int)), for items that are less important. The UI may choose to show these items smaller, or at a different position in the list, compared with your app's[PRIORITY_DEFAULT](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#PRIORITY_DEFAULT)items.

<br />

Constant Value: -1 (0xffffffff)  

### PRIORITY_MAX

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int PRIORITY_MAX
```

Highest notification priority for[setPriority(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setPriority(int)), for your application's most important items that require the user's prompt attention or input.

<br />

Constant Value: 2 (0x00000002)  

### PRIORITY_MIN

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int PRIORITY_MIN
```

Lowest notification priority for[setPriority(int)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setPriority(int)); these items might not be shown to the user except under special circumstances, such as detailed notification logs.

<br />

Constant Value: -2 (0xfffffffe)  

### STREAM_DEFAULT

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int STREAM_DEFAULT
```

Use this constant as the value for audioStreamType to request that the default stream type for notifications be used. Currently the default stream type is[STREAM_NOTIFICATION](https://developer.android.com/reference/android/media/AudioManager.html#STREAM_NOTIFICATION).

<br />

Constant Value: -1 (0xffffffff)  

### VISIBILITY_PRIVATE

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int VISIBILITY_PRIVATE
```

Notification visibility: Show this notification on all lockscreens, but conceal sensitive or private information on secure lockscreens.

<br />

**See also:**

- [visibility](https://developer.android.com/reference/android/app/Notification.html#visibility)

Constant Value: 0 (0x00000000)  

### VISIBILITY_PUBLIC

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int VISIBILITY_PUBLIC
```

Notification visibility: Show this notification in its entirety on all lockscreens.

<br />

**See also:**

- [visibility](https://developer.android.com/reference/android/app/Notification.html#visibility)

Constant Value: 1 (0x00000001)  

### VISIBILITY_SECRET

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int VISIBILITY_SECRET
```

Notification visibility: Do not reveal any part of this notification on a secure lockscreen.

<br />

**See also:**

- [visibility](https://developer.android.com/reference/android/app/Notification.html#visibility)

Constant Value: -1 (0xffffffff)

## Public constructors

### NotificationCompat

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
NotificationCompat ()
```

<br />

<br />

## Public methods

### getAction

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
NotificationCompat.Action getAction (Notification notification, 
                int actionIndex)
```

Get an action on this notification in a backwards compatible manner. Actions were supported from JellyBean (Api level 16) forwards.

<br />

|                             Parameters                              ||
|----------------|-----------------------------------------------------|
| `notification` | `Notification`: The notification to inspect. <br /> |
| `actionIndex`  | `int`: The index of the action to retrieve. <br />  |

|                                                            Returns                                                            ||
|-----------------------------------------------------------------------------------------------------------------------|--------|
| [NotificationCompat.Action](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action) | <br /> |

### getActionCount

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getActionCount (Notification notification)
```

Get the number of actions in this notification in a backwards compatible manner. Actions were supported from JellyBean (Api level 16) forwards.

<br />

|              Parameters               ||
|----------------|-----------------------|
| `notification` | `Notification` <br /> |

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getBadgeIconType

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getBadgeIconType (Notification notification)
```

Returns what icon should be shown for this notification if it is being displayed in a Launcher that supports badging. Will be one of[BADGE_ICON_NONE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#BADGE_ICON_NONE),[BADGE_ICON_SMALL](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#BADGE_ICON_SMALL), or[BADGE_ICON_LARGE](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#BADGE_ICON_LARGE).

<br />

|              Parameters               ||
|----------------|-----------------------|
| `notification` | `Notification` <br /> |

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getCategory

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getCategory (Notification notification)
```

Get the category of this notification in a backwards compatible manner.

<br />

|                             Parameters                              ||
|----------------|-----------------------------------------------------|
| `notification` | `Notification`: The notification to inspect. <br /> |

|     Returns      ||
|----------|--------|
| `String` | <br /> |

### getChannelId

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getChannelId (Notification notification)
```

<br />

<br />

|              Parameters               ||
|----------------|-----------------------|
| `notification` | `Notification` <br /> |

|                              Returns                               ||
|----------|----------------------------------------------------------|
| `String` | the ID of the channel this notification posts to. <br /> |

### getExtras

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Bundle getExtras (Notification notification)
```

Gets the[extras](https://developer.android.com/reference/android/app/Notification.html#extras)field from a notification in a backwards compatible manner. Extras field was supported from JellyBean (Api level 16) forwards. This function will return null on older api levels.

<br />

|              Parameters               ||
|----------------|-----------------------|
| `notification` | `Notification` <br /> |

|                                     Returns                                      ||
|--------------------------------------------------------------------------|--------|
| [Bundle](https://developer.android.com/reference/android/os/Bundle.html) | <br /> |

### getGroup

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getGroup (Notification notification)
```

Get the key used to group this notification into a cluster or stack with other notifications on devices which support such rendering.

<br />

|              Parameters               ||
|----------------|-----------------------|
| `notification` | `Notification` <br /> |

|     Returns      ||
|----------|--------|
| `String` | <br /> |

### getGroupAlertBehavior

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getGroupAlertBehavior (Notification notification)
```

Returns which type of notifications in a group are responsible for audibly alerting the user. See[GROUP_ALERT_ALL](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#GROUP_ALERT_ALL),[GROUP_ALERT_CHILDREN](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#GROUP_ALERT_CHILDREN),[GROUP_ALERT_SUMMARY](https://developer.android.com/reference/android/support/v4/app/NotificationCompat#GROUP_ALERT_SUMMARY).

<br />

|              Parameters               ||
|----------------|-----------------------|
| `notification` | `Notification` <br /> |

|    Returns    ||
|-------|--------|
| `int` | <br /> |

### getInvisibleActions

```
List<NotificationCompat.Action> getInvisibleActions (Notification notification)
```

Returns the invisible actions contained within the given notification.

<br />

|              Parameters               ||
|----------------|-----------------------|
| `notification` | `Notification` <br /> |

|                                                                 Returns                                                                 ||
|---------------------------------------------------------------------------------------------------------------------------------|--------|
| `List<`[NotificationCompat.Action](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action)`>` | <br /> |

### getLocalOnly

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean getLocalOnly (Notification notification)
```

Get whether or not this notification is only relevant to the current device.

Some notifications can be bridged to other devices for remote display. If this hint is set, it is recommend that this notification not be bridged.

<br />

|              Parameters               ||
|----------------|-----------------------|
| `notification` | `Notification` <br /> |

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### getShortcutId

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getShortcutId (Notification notification)
```

Returns the[id](https://developer.android.com/reference/android/support/v4/content/pm/ShortcutInfoCompat#getId())that this notification supersedes, if any.

<br />

|              Parameters               ||
|----------------|-----------------------|
| `notification` | `Notification` <br /> |

|     Returns      ||
|----------|--------|
| `String` | <br /> |

### getSortKey

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getSortKey (Notification notification)
```

Get a sort key that orders this notification among other notifications from the same package. This can be useful if an external sort was already applied and an app would like to preserve this. Notifications will be sorted lexicographically using this value, although providing different priorities in addition to providing sort key may cause this value to be ignored.

This sort key can also be used to order members of a notification group. See[setGroup(String)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setGroup(java.lang.String)).

<br />

|              Parameters               ||
|----------------|-----------------------|
| `notification` | `Notification` <br /> |

|     Returns      ||
|----------|--------|
| `String` | <br /> |

**See also:**

- [compareTo(String)](https://developer.android.com/reference/java/lang/String#compareTo(java.lang.String))  

### getTimeoutAfter

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
long getTimeoutAfter (Notification notification)
```

Returns the time at which this notification should be canceled by the system, if it's not canceled already.

<br />

|              Parameters               ||
|----------------|-----------------------|
| `notification` | `Notification` <br /> |

|    Returns     ||
|--------|--------|
| `long` | <br /> |

### isGroupSummary

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean isGroupSummary (Notification notification)
```

Get whether this notification to be the group summary for a group of notifications. Grouped notifications may display in a cluster or stack on devices which support such rendering. Requires a group key also be set using[setGroup(String)](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder#setGroup(java.lang.String)).

<br />

|              Parameters               ||
|----------------|-----------------------|
| `notification` | `Notification` <br /> |

|                             Returns                             ||
|-----------|------------------------------------------------------|
| `boolean` | Whether this notification is a group summary. <br /> |

-

  ## Annotations

  - [NotificationCompat.Action.SemanticAction](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action.SemanticAction)
-

  ## Interfaces

  - [ActionBarDrawerToggle.Delegate](https://developer.android.com/reference/android/support/v4/app/ActionBarDrawerToggle.Delegate)
  - [ActionBarDrawerToggle.DelegateProvider](https://developer.android.com/reference/android/support/v4/app/ActionBarDrawerToggle.DelegateProvider)
  - [ActivityCompat.OnRequestPermissionsResultCallback](https://developer.android.com/reference/android/support/v4/app/ActivityCompat.OnRequestPermissionsResultCallback)
  - [ActivityCompat.PermissionCompatDelegate](https://developer.android.com/reference/android/support/v4/app/ActivityCompat.PermissionCompatDelegate)
  - [FragmentManager.BackStackEntry](https://developer.android.com/reference/android/support/v4/app/FragmentManager.BackStackEntry)
  - [FragmentManager.OnBackStackChangedListener](https://developer.android.com/reference/android/support/v4/app/FragmentManager.OnBackStackChangedListener)
  - [LoaderManager.LoaderCallbacks](https://developer.android.com/reference/android/support/v4/app/LoaderManager.LoaderCallbacks)
  - [NotificationCompat.Action.Extender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action.Extender)
  - [NotificationCompat.Extender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Extender)
  - [SharedElementCallback.OnSharedElementsReadyListener](https://developer.android.com/reference/android/support/v4/app/SharedElementCallback.OnSharedElementsReadyListener)
  - [TaskStackBuilder.SupportParentable](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder.SupportParentable)
-

  ## Classes

  - [ActionBarDrawerToggle](https://developer.android.com/reference/android/support/v4/app/ActionBarDrawerToggle)
  - [ActivityCompat](https://developer.android.com/reference/android/support/v4/app/ActivityCompat)
  - [ActivityManagerCompat](https://developer.android.com/reference/android/support/v4/app/ActivityManagerCompat)
  - [ActivityOptionsCompat](https://developer.android.com/reference/android/support/v4/app/ActivityOptionsCompat)
  - [AlarmManagerCompat](https://developer.android.com/reference/android/support/v4/app/AlarmManagerCompat)
  - [AppLaunchChecker](https://developer.android.com/reference/android/support/v4/app/AppLaunchChecker)
  - [AppOpsManagerCompat](https://developer.android.com/reference/android/support/v4/app/AppOpsManagerCompat)
  - [BundleCompat](https://developer.android.com/reference/android/support/v4/app/BundleCompat)
  - [DialogFragment](https://developer.android.com/reference/android/support/v4/app/DialogFragment)
  - [Fragment](https://developer.android.com/reference/android/support/v4/app/Fragment)
  - [Fragment.SavedState](https://developer.android.com/reference/android/support/v4/app/Fragment.SavedState)
  - [FragmentActivity](https://developer.android.com/reference/android/support/v4/app/FragmentActivity)
  - [FragmentContainer](https://developer.android.com/reference/android/support/v4/app/FragmentContainer)
  - [FragmentController](https://developer.android.com/reference/android/support/v4/app/FragmentController)
  - [FragmentHostCallback](https://developer.android.com/reference/android/support/v4/app/FragmentHostCallback)
  - [FragmentManager](https://developer.android.com/reference/android/support/v4/app/FragmentManager)
  - [FragmentManager.FragmentLifecycleCallbacks](https://developer.android.com/reference/android/support/v4/app/FragmentManager.FragmentLifecycleCallbacks)
  - [FragmentManagerNonConfig](https://developer.android.com/reference/android/support/v4/app/FragmentManagerNonConfig)
  - [FragmentPagerAdapter](https://developer.android.com/reference/android/support/v4/app/FragmentPagerAdapter)
  - [FragmentStatePagerAdapter](https://developer.android.com/reference/android/support/v4/app/FragmentStatePagerAdapter)
  - [FragmentTabHost](https://developer.android.com/reference/android/support/v4/app/FragmentTabHost)
  - [FragmentTransaction](https://developer.android.com/reference/android/support/v4/app/FragmentTransaction)
  - [FrameMetricsAggregator](https://developer.android.com/reference/android/support/v4/app/FrameMetricsAggregator)
  - [JobIntentService](https://developer.android.com/reference/android/support/v4/app/JobIntentService)
  - [ListFragment](https://developer.android.com/reference/android/support/v4/app/ListFragment)
  - [LoaderManager](https://developer.android.com/reference/android/support/v4/app/LoaderManager)
  - [NavUtils](https://developer.android.com/reference/android/support/v4/app/NavUtils)
  - [NotificationCompat](https://developer.android.com/reference/android/support/v4/app/NotificationCompat)
  - [NotificationCompat.Action](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action)
  - [NotificationCompat.Action.Builder](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action.Builder)
  - [NotificationCompat.Action.WearableExtender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Action.WearableExtender)
  - [NotificationCompat.BigPictureStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigPictureStyle)
  - [NotificationCompat.BigTextStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.BigTextStyle)
  - [NotificationCompat.Builder](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder)
  - [NotificationCompat.CarExtender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.CarExtender)
  - [NotificationCompat.CarExtender.UnreadConversation](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.CarExtender.UnreadConversation)
  - [NotificationCompat.CarExtender.UnreadConversation.Builder](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.CarExtender.UnreadConversation.Builder)
  - [NotificationCompat.DecoratedCustomViewStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.DecoratedCustomViewStyle)
  - [NotificationCompat.InboxStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.InboxStyle)
  - [NotificationCompat.MessagingStyle](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle)
  - [NotificationCompat.MessagingStyle.Message](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.MessagingStyle.Message)
  - [NotificationCompat.Style](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Style)
  - [NotificationCompat.WearableExtender](https://developer.android.com/reference/android/support/v4/app/NotificationCompat.WearableExtender)
  - [NotificationCompatExtras](https://developer.android.com/reference/android/support/v4/app/NotificationCompatExtras)
  - [NotificationCompatSideChannelService](https://developer.android.com/reference/android/support/v4/app/NotificationCompatSideChannelService)
  - [NotificationManagerCompat](https://developer.android.com/reference/android/support/v4/app/NotificationManagerCompat)
  - [RemoteInput](https://developer.android.com/reference/android/support/v4/app/RemoteInput)
  - [RemoteInput.Builder](https://developer.android.com/reference/android/support/v4/app/RemoteInput.Builder)
  - [ServiceCompat](https://developer.android.com/reference/android/support/v4/app/ServiceCompat)
  - [ShareCompat](https://developer.android.com/reference/android/support/v4/app/ShareCompat)
  - [ShareCompat.IntentBuilder](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentBuilder)
  - [ShareCompat.IntentReader](https://developer.android.com/reference/android/support/v4/app/ShareCompat.IntentReader)
  - [SharedElementCallback](https://developer.android.com/reference/android/support/v4/app/SharedElementCallback)
  - [TaskStackBuilder](https://developer.android.com/reference/android/support/v4/app/TaskStackBuilder)
-

  ## Exceptions

  - [Fragment.InstantiationException](https://developer.android.com/reference/android/support/v4/app/Fragment.InstantiationException)