Notification Channel Android O

suggest change

Versions

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

  1. class NotificationUtils {} creates the notification channel
  2. createChannel() 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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents