How to remove old notification channels?

前端 未结 1 798
忘掉有多难
忘掉有多难 2020-12-18 20:08

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 setti

相关标签:
1条回答
  • 2020-12-18 20:15

    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");
    
    0 讨论(0)
提交回复
热议问题