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

NotificationCompat

open class NotificationCompat
kotlin.Any
   ↳ androidx.core.app.NotificationCompat

Helper for accessing features in android.app.Notification.

Summary

Nested classes
open

Structure to encapsulate a named action that can be shown as part of this notification.

open

Helper class for generating large-format notifications that include a large image attachment.

open

Helper class for generating large-format notifications that include a lot of text.

Encapsulates the information needed to display a notification as a bubble.

open

Builder class for NotificationCompat objects.

Helper class to add Android Auto extensions to notifications.

open

Notification style for custom views that are decorated by the system.

abstract

Extender interface for use with Builder#extend.

open

Helper class for generating large-format notifications that include a list of (up to 5) strings.

open

Helper class for generating large-format notifications that include multiple back-and-forth messages of varying types between any number of people.

abstract

An object that can apply a rich notification style to a Notification.Builder object.

Helper class to add wearable extensions to notifications.

Constants
static Int

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

static Int

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

static Int

If this notification is being shown as a badge, use the icon provided to Builder#setSmallIcon(int) to represent this notification.

static String

Notification category: alarm or timer.

static String

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

static String

Notification category: asynchronous bulk message (email).

static String

Notification category: error in background operation or authentication status.

static String

Notification category: calendar event.

static String

Notification category: temporarily sharing location.

static String

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

static String

Notification category: missed call.

static String

Notification category: map turn-by-turn navigation.

static String

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

static String

Notification category: promotion or advertisement.

static String

Notification category: a specific, timely recommendation for a single thing.

static String

Notification category: user-scheduled reminder.

static String

Notification category: indication of running background service.

static String

Notification category: social network or sharing update.

static String

Notification category: ongoing information about device or contextual status.

static String

Notification category: running stopwatch.

static String

Notification category: system or device status update.

static String

Notification category: media transport control for playback.

static String

Notification category: tracking a user's workout.

static Int

Value of Notification#color equal to 0 (also known as Color.TRANSPARENT), telling the system not to decorate this notification with any special color but instead use default colors when presenting this notification.

static Int

Use all default values (where applicable).

static Int

Use the default notification lights.

static Int

Use the default notification sound.

static Int

Use the default notification vibrate.

static String

Keys into the getExtras Bundle: the audio contents of this notification.

static String

extras key: A content URI pointing to an image that can be displayed in the background when the notification is selected.

static String

extras key: this is the longer text shown in the big form of a BigTextStyle notification, as supplied to BigTextStyle#bigText(CharSequence).

static String

Optional extra for INTENT_CATEGORY_NOTIFICATION_PREFERENCES.

static String

Optional extra for INTENT_CATEGORY_NOTIFICATION_PREFERENCES.

static String

extras key: whether the chronometer set on the notification should count down instead of counting up.

static String

extras key: whether the notification should be colorized as supplied to Builder#setColorized(boolean).

static String

extras key: the indices of actions to be shown in the compact view, as supplied to (e.g.)

static String

extras key: A string representing the name of the specific NotificationCompat.Style used to create this notification.

static String

extras key: a String to be displayed as the title to a conversation represented by a MessagingStyle.

static String

Key for compat's MessagingStyle#getConversationTitle().

static String

extras key: an array of historic MessagingStyle.Message bundles provided by a MessagingStyle notification.

static String

extras key: this is a small piece of additional text as supplied to Builder#setContentInfo(CharSequence).

static String

extras key: whether the NotificationCompat.MessagingStyle notification represents a group conversation.

static String

extras key: this is a bitmap to be used instead of the small icon when showing the notification payload, as supplied to Builder#setLargeIcon(android.graphics.Bitmap).

static String

extras key: this is a bitmap to be used instead of the one from Builder#setLargeIcon(android.graphics.Bitmap) when the notification is shown in its expanded form, as supplied to BigPictureStyle#bigLargeIcon(android.graphics.Bitmap).

static String

Notification key: A android.media.session.MediaSession.Token associated with a android.app.Notification.MediaStyle notification.

static String

extras key: an array of MessagingStyle.Message bundles provided by a android.app.Notification.MessagingStyle notification.

static String

extras key: the person to display for all messages sent by the user, including direct replies to MessagingStyle notifications.

static String

Optional extra for INTENT_CATEGORY_NOTIFICATION_PREFERENCES.

static String

Optional extra for INTENT_CATEGORY_NOTIFICATION_PREFERENCES.

static String

extras key: A String array containing the people that this notification relates to, each of which was supplied to Builder#addPerson(String).

static String

extras key: : An arrayList of Person objects containing the people that this notification relates to, each of which was supplied to Builder#addPerson(Person).

static String

extras key: this is a bitmap to be shown in BigPictureStyle expanded notifications, supplied to BigPictureStyle#bigPicture(android.graphics.Bitmap).

static String

extras key: this is the progress value supplied to Builder#setProgress(int, int, boolean).

static String

extras key: whether the progress bar is indeterminate, supplied to Builder#setProgress(int, int, boolean).

static String

extras key: this is the maximum value supplied to Builder#setProgress(int, int, boolean).

static String

extras key: this is the remote input history, as supplied to Builder#setRemoteInputHistory(CharSequence[]).

static String

extras key: the username to be displayed for all messages sent by the user including direct replies MessagingStyle notification.

static String

extras key: whether the when field set using Builder#setWhen should be shown as a count-up timer (specifically a android.widget.Chronometer) instead of a timestamp, as supplied to Builder#setUsesChronometer(boolean).

static String

extras key: whether the when field set using Builder#setWhen should be shown, as supplied to