java.lang.Object | |
↳ | android.support.v4.app.NotificationManagerCompat |
Compatibility library for NotificationManager with fallbacks for older platforms.
To use this class, call the static function from(Context)
to get a
NotificationManagerCompat
object, and then call one of its
methods to post or cancel notifications.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ACTION_BIND_SIDE_CHANNEL | Intent action to register for on a service to receive side channel notifications. | |||||||||
String | EXTRA_USE_SIDE_CHANNEL | Notification extras key: if set to true, the posted notification should use the side channel for delivery instead of using notification manager. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Cancel a previously shown notification.
| |||||||||||
Cancel a previously shown notification.
| |||||||||||
Cancel all previously shown notifications.
| |||||||||||
Get a
NotificationManagerCompat instance for a provided context.
| |||||||||||
Get the set of packages that have an enabled notification listener component within them.
| |||||||||||
Post a notification to be shown in the status bar, stream, etc.
| |||||||||||
Post a notification to be shown in the status bar, stream, etc.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Intent action to register for on a service to receive side channel
notifications. The listening service must be in the same package as an enabled
NotificationListenerService
.
Notification extras key: if set to true, the posted notification should use the side channel for delivery instead of using notification manager.
Cancel a previously shown notification.
id | the ID of the notification |
---|
Cancel a previously shown notification.
tag | the string identifier of the notification. |
---|---|
id | the ID of the notification |
Cancel all previously shown notifications.
Get a NotificationManagerCompat
instance for a provided context.
Get the set of packages that have an enabled notification listener component within them.
Post a notification to be shown in the status bar, stream, etc.
id | the ID of the notification |
---|---|
notification | the notification to post to the system |
Post a notification to be shown in the status bar, stream, etc.
tag | the string identifier for a notification. Can be null . |
---|---|
id | the ID of the notification. The pair (tag, id) must be unique within your app. |
notification | the notification to post to the system |