2

I'm using flutter local notification plugin and I want the user to be able to customize the notification sound and vibration but the plugin's docs says:

For Android 8.0+, sounds and vibrations are associated with notification channels and can only be configured when they are first created. Showing/scheduling a notification will create a channel with the specified id if it doesn't exist already. If another notification specifies the same channel id but tries to specify another sound or vibration pattern then nothing occurs.

so I looked up for deleting the channel just to create a new one with the new settings and the docs says that it's a feature in android but I couldn't find any reference on how to do that. is there's a way to do that, or is there's any another solution?

thanks in advance.

Ramez Sleem
  • 53
  • 1
  • 6

1 Answers1

2

I didn't find an answer or solution about deleting channels, but I tried making a channel for every sound just by using the sound name as an id for the channel, and it worked :).

Ramez Sleem
  • 53
  • 1
  • 6
  • Nice Idea :) I will use too. – Sos. Mar 08 '23 at 08:24
  • By the way there is a function to delete the notification channel in flutter_local_notifications but it doesn't work. So just use your solution. – Sos. Mar 08 '23 at 08:35