Java android.app NotificationManager fields, constructors, methods, implement or subclass

Example usage for Java android.app NotificationManager fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.app NotificationManager.

The text is from its open source code.

Field

intIMPORTANCE_NONE
A notification with no importance: does not show in the shade.
intIMPORTANCE_MIN
Min notification importance: only shows in the shade, below the fold.
intIMPORTANCE_LOW
Low notification importance: shows everywhere, but is not intrusive.
intIMPORTANCE_DEFAULT
Default notification importance: shows everywhere, makes noise, but does not visually intrude.
intIMPORTANCE_HIGH
Higher notification importance: shows everywhere, makes noise and peeks.

Method

booleanareNotificationsEnabled()
Returns whether notifications from the calling package are blocked.
voidcancel(int id)
Cancel a previously shown notification.
voidcancel(String tag, int id)
Cancel a previously shown notification.
voidcancelAll()
Cancel all previously shown notifications.
voidcreateNotificationChannel(@NonNull NotificationChannel channel)
Creates a notification channel that notifications can be posted to.
voidcreateNotificationChannelGroup(@NonNull NotificationChannelGroup group)
Creates a group container for NotificationChannel objects.
voidcreateNotificationChannels(@NonNull List channels)
Creates multiple notification channels that different notifications can be posted to.
voiddeleteNotificationChannel(String channelId)
Deletes the given notification channel.
voiddeleteNotificationChannelGroup(String groupId)
Deletes the given notification channel group, and all notification channels that belong to it.
NotificationManagerfrom(Context context)
StatusBarNotification[]getActiveNotifications()
Recover a list of active notifications: ones that have been posted by the calling app that have not yet been dismissed by the user or #cancel(String,int) ed by the app.
NotificationChannelgetNotificationChannel(String channelId)
Returns the notification channel settings for a given channel id.
ListgetNotificationChannelGroups()
Returns all notification channel groups belonging to the calling app.
ListgetNotificationChannels()
Returns all notification channels belonging to the calling package.
booleanisNotificationPolicyAccessGranted()
Checks the ability to modify notification do not disturb policy for the calling package.
voidnotify(int id, Notification notification)
Post a notification to be shown in the status bar.
voidnotify(String tag, int id, Notification notification)
Post a notification to be shown in the status bar.
StringtoString()
Returns a string representation of the object.