-
Notifications
You must be signed in to change notification settings - Fork 605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom notification sound is not played while the app is in foreground #1388
Comments
This issue may need more information before it can be addressed. In particular, it will need a reliable Code Reproduction that demonstrates the issue. Please see the Contributing Guide for how to create a Code Reproduction. Thanks! |
Could be related to #1368 |
I created a PR which should fix this issue - it will allow you to use a custom channel for foreground notifications. |
This is caused by the fact that the plugin creates it's own special channel for displaying notifications when the app is in the foreground (and you have the My PR (#1423) fixes this by allowing you to specify a sound, or in fact specify the channel yourself for foreground notifications. |
I've given up and created my own plugin to fix this, in case anyone comes across this... |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out. |
Bug Report
Plugin(s)
@capacitor/push-notifications": "^4.0.0"
Capacitor Version
Platform(s)
Android
Current Behavior
I created an android notification channel and a custom notification sound for it. The issue is that the custom sound only plays while the user has the app closed or in background.
Expected Behavior
The custom notification sound should be played even if the app is in foreground.
Code Reproduction
Other Technical Details
Additional Context
The text was updated successfully, but these errors were encountered: