Android 12 Developer Preview is here! Try it out, and give us your feedback!

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

ext