Notification Channel Android O
suggest changeVersions
Notification channels were introduced in Android 8.0 (API 26). This note was written while that release was still a developer preview.
Introduction
Notification channels let app developers group notifications into channels. The user can change notification settings for an entire channel at once. This feature was introduced in Android O. When this note was written, it was available in the developer preview.
Syntax
class NotificationUtils {}creates the notification channelcreateChannel()is a generic method for creating a notification
Parameters
| Method | Description |
|---|---|
IMPORTANCE_MAX |
unused |
IMPORTANCE_HIGH |
shows everywhere, makes noise and peeks |
IMPORTANCE_DEFAULT |
shows everywhere, makes noise, but does not visually intrude |
IMPORTANCE_LOW |
shows everywhere, but is not intrusive |
IMPORTANCE_MIN |
only shows in the shade, below the fold |
IMPORTANCE_NONE |
a notification with no importance; does not show in the shade |
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents