Creating Notification Channels on Android Oreo | With Example

Starting from Oreo (Android Version 8.0)  Android introduced the concept of Notification Channels which  groups notifications into channels and allows developers to implement common behavior for the complete channel. This behavior will be followed by all the notifications which are a part of that channel. The main purpose of this was to give more control of the notification behavior to the user. Once our notifications are a part of a channel users can override their behavior set by you . Following are some features of Notification Channels

  • On and above Android 8.0 (Oreo) it is mandatory for all the notifications to be a part of any one Notification Channel.
  • A single application can have multiple notification channels.
  • Every Notification Channel has a unique identifier,  user visible name and description.
  • Once a Notification Channel is created, you cannot do any changes to its behavior. Even deleting and recreating a channel with the same ID wont help. Only user can  override the behavior set by you
  • The behavior you set on a Notification Channel overrides the behavior set on individual notifications.
  • Notification Channels are not a part of support library. Therefore they should be created and will work only on Android 8.0 and above

notification_

Continue reading

Create and Display Notification on Android with Example

Displaying notification is one of the most important features in an Android app. Notification are short messages which appear on home screen of the device. In this example you will learn how to programatically create and display a Notification from your app which will work for all versions of Android (Even Oreo)

notification_image

Continue reading