https://kotlinlang.org logo
Title
g

Geert

05/25/2020, 8:48 AM
Can someone help me with custom notification sounds? Do i have to recreate a new channel every time I the user changes it in my app? Currently I have to uninstall the app to get the new sound working. That doesn’t seem correctly?
:stackoverflow: 1
l

louiscad

05/25/2020, 11:52 AM
The docs tell you that the app can only push non existing channels, and cannot edit the channels after that. Only the user can, so the user can choose which app can disturb, and how exactly.
g

Geert

05/25/2020, 12:10 PM
Yeah I figured that out, but I want to provide 4 custom sounds. Does that mean I have to create 4 notification channels?
Found this code `
val intent = Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS).apply {
    putExtra(Settings.EXTRA_APP_PACKAGE, packageName)
    putExtra(Settings.EXTRA_CHANNEL_ID, myNotificationChannel.getId())
}
startActivity(intent)
that the user can change it, but my sounds are not shown here