So every app will have this new Notification settings screen and those who are not supporting them would see one channel as Miscellaneous. So as apps starts supporting Notification Channels the channels will be listed as shown in the screenshot left. So I have created a Demo app to demonstrate this (Source is available at my Github). Here I have created some channels like Technology, Android, General and you can see those listed down there and each of the channel can have their own customisations, like Importance, and Notification light.

To Develop on Android O API’s now you have to set compileSdkVersion "android-O" buildToolsVersion "26.0.0-rc1" so this is how my build.gradle file look.

Lets see how to create a Notification Channel

Crating a Notification is easy and direct, and the best part is even if create a channel for already existing channel it would not harm, so you can call this more than one time as well.

We have get the NotificationManager by using the getSystemService(); and now we have access to the new Android O method called NotificationChannel(); which accepts a channelId channelName and the importance of the channel. Now that we have created a notification lets see how do we trigger the notification.

How to Create a Notification

Now Notification.Builder() method expects a channelId or you can also use setChannel() method to set the notification’s channel.

Here you can see pretty much same old things for all other parameters. So from now on we have to create the Channel first and then trigger the notification with that channelId .

Updating Channel Settings

Users can update the Notification Channel Settings when ever they want either from the notification itself or from the settings page, you can also redirect the user to the update channel settings page via Intent .

It’s straightforward that you have to give the package name and correct channelId.

Deleting a Notification Channel

Deleting the notification channel is also straight forward, you have to pass the channelId to the method deleteNotificationChannel

Deleting a notification channel will delete and show it on the screen like this.

Creating a Notification Channel Group

There are times where the same set of notification is set for two broad Groups, Example is the user may have want to subscribe to Weekly technology news, but not for the daily technology news. This Notification Channel has covered that as well. You can easily create Notification Channel Group by using createNotificationChannelGroup .

This is how it looks on the Notification Settings page now.

Reading the Channel Settings

It’s easy to get the Channel Settings as well by using the method notificationChannel.getters(); as described below.

I have created a Demo Project to explore all these methods in Github at https://github.com/msomu/AndroidNotificationChannelsDemo