NotificationManagerCompat

public final class NotificationManagerCompat


Compatibility library for NotificationManager with fallbacks for older platforms.

To use this class, call the static function from to get a NotificationManagerCompat object, and then call one of its methods to post or cancel notifications.

Summary

Constants

static final String

Intent action to register for on a service to receive side channel notifications.

static final String

Notification extras key: if set to true, the posted notification should use the side channel for delivery instead of using notification manager.

static final int

Default notification importance: shows everywhere, allowed to makes noise, but does not visually intrude.

static final int

Higher notification importance: shows everywhere, allowed to makes noise and peek.

static final int

Low notification importance: shows everywhere, but is not intrusive.

static final int

Highest notification importance: shows everywhere, allowed to makes noise, peek, and use full screen intents.

static final int

Min notification importance: only shows in the shade, below the fold.

static final int

A notification with no importance: shows nowhere, is blocked.

static final int

Value signifying that the user has not expressed an importance.

Public constructors

Public methods

boolean

Returns whether notifications from the calling package are not blocked.

void
cancel(int id)

Cancel a previously shown notification.

void
cancel(@Nullable String tag, int id)

Cancel a previously shown notification.

void

Cancel all previously shown notifications.

void

Creates a notification channel that notifications can be posted to.

void

Creates a notification channel that notifications can be posted to.

void

Creates a group container for