Example usage for Java android.app NotificationManager fields, constructors, methods, implement or subclass
The text is from its open source code.
int | IMPORTANCE_NONE A notification with no importance: does not show in the shade. |
int | IMPORTANCE_MIN Min notification importance: only shows in the shade, below the fold. |
int | IMPORTANCE_LOW Low notification importance: shows everywhere, but is not intrusive. |
int | IMPORTANCE_DEFAULT Default notification importance: shows everywhere, makes noise, but does not visually intrude. |
int | IMPORTANCE_HIGH Higher notification importance: shows everywhere, makes noise and peeks. |
boolean | areNotificationsEnabled() Returns whether notifications from the calling package are blocked. |
void | cancel(int id) Cancel a previously shown notification. |
void | cancel(String tag, int id) Cancel a previously shown notification. |
void | cancelAll() Cancel all previously shown notifications. |
void | createNotificationChannel(@NonNull NotificationChannel channel) Creates a notification channel that notifications can be posted to. |
void | createNotificationChannelGroup(@NonNull NotificationChannelGroup group) Creates a group container for NotificationChannel objects. |
void | createNotificationChannels(@NonNull List Creates multiple notification channels that different notifications can be posted to. |
void | deleteNotificationChannel(String channelId) Deletes the given notification channel. |
void | deleteNotificationChannelGroup(String groupId) Deletes the given notification channel group, and all notification channels that belong to it. |
NotificationManager | from(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. |
NotificationChannel | getNotificationChannel(String channelId) Returns the notification channel settings for a given channel id. |
List | getNotificationChannelGroups() Returns all notification channel groups belonging to the calling app. |
List | getNotificationChannels() Returns all notification channels belonging to the calling package. |
boolean | isNotificationPolicyAccessGranted() Checks the ability to modify notification do not disturb policy for the calling package. |
void | notify(int id, Notification notification) Post a notification to be shown in the status bar. |
void | notify(String tag, int id, Notification notification) Post a notification to be shown in the status bar. |
String | toString() Returns a string representation of the object. |