Closed hendaoui closed 4 years ago
I can second that sound does not work on current Android versions :(
There is any way to play notification sound?
I can confirm the sound IS working on android 9. You have to change the channel name each time you change something in the options passed to schedule, or you have to uninstall the app for changes to take effect. What i tested:
I've migrated my app to this plugin instead of the original from Katzer and I'm suffering this too. No sound at all. I don't use own channels or own sound and fallback these to the default, but no sound or vibration is activated. Anything new regarding this @Steffaan ?
You can't fall back to the default, once you schedule with a channel name (or without, which will use the default from the module), this channel is burned to android settings for your app, you can't change anything for this channel anymore, only user can, through Android UI Notifications for your app. You can only uninstall the app or remove the channel through same user settings.
Consider scenario where you created a notification channel and user has decided that notifications from your app are of different priority as your app dictated. For this reason, your app can't be allowed to change user preference about your app's notifications, once they were given to user's control. The user could get unhappy, if your app had overridden their preference.
Well, I've played with the Android UI a bit and it seems the sound is back even if I don't specify own channel and fallback to the default. Sorry for misleading comment.
@misterti I didn't change channel name. I've only updated the plugin and the notification sound magically disappeared. I don't use any channel name so for the Katzer's plugin it used the "Default" channel if I good remember and indeed it is named "Default" if I check Android UI. I've also tried to uninstall and install again, clean app data and cache and no way the sound is bring back.
@misterti is right.
This is how Android is designed. Once the channel is made, no changes can be made to that specific channel.
Only way to get rid of those settings is by creating a new channel or reinstalling the application.
WARNING: IF YOU IGNORE THIS TEMPLATE, WE'LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!
Sound doesn't work on Android Oreo / Pie
Your Environment
cordova -v
): 7.0.0cordova platform ls
): android 7.0.0Expected Behavior
Playing custom sound when a notification is fired
Actual Behavior
If the properties "channel" or "every" is set, the notification will never appear otherwise, everything works well except the sound.
Context