My app now has 3 notification channels, I want to remove 2 of them.
I thought simply not registering 2 channels would do the trick but when I open the notification settings on the Android device, the old channels still appear.
Is it possible to remove them?
They have no use and can confuse the users.
Asked
Active
Viewed 1.9k times
22

SagiLow
- 5,721
- 9
- 60
- 115
1 Answers
35
Notification channels stay forever once they are created.
To remove them again, simply call deleteNotificationChannel()
on the NotificationManager with the ID of the channel you want to delete:
notificationManager.deleteNotificationChannel("channel_id");

Floern
- 33,559
- 24
- 104
- 119
-
3Thank you. it works. Just FYI Android adds 'x categories deleted' message on the app notifications screen. – SagiLow Aug 11 '18 at 17:39
-
1@SagiLow Did you find any solution to remove 'x categories deleted' ? – dralexnumber Dec 06 '18 at 11:35
-
@deraxnumber sorry, no luck – SagiLow Dec 07 '18 at 12:37
-
@SagiLow https://us.community.samsung.com/t5/Galaxy-S-Phones/Categories-deleted-in-notification-settings/td-p/1277742 – Ambran Aug 11 '20 at 11:42