Delete Notification Channel Without Id
My app has a bug where it sends different push notification and up until now every notification got its own channel ID, so the user has got for every new notification a new channel which he can then enable/disable by toggle. This bug is now fixed but I want to delete the old unnecassary channels programmatically and I found the way do it like this:
// The id of the channel. val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager val id: String = "my_channel_01" notificationManager.deleteNotificationChannel(id)
But since every channel got created by a random generated ID and this ID has been discarded I can't delete the channel by his ID.
Is there a way to list all channel IDs a user got or any other way how I can delete old channels without knowing the ID
obtain full list of all already created channels by calling getNotificationChannels()
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View