You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If presentationOptions are given in the capacitor config, the push notification plugin automatically creates a notification channel to use for those foreground notifications, with a hard-coded name and description ("Push Notifications Foreground" / "Push notifications in foreground"). This is quite unexpected, especially if the app is internationalized and/or specifies its own channels.
Platform(s)
Android
Preferred Solution
Push notifications in foreground should hade the same behavior as other push notifications, and use the "regular" default notification channel if no channel is specified on the notification.
An issue with this solution is however that a notification channel might be needed in order to use the "sound" option for presentationOptions.
Alternatives
An alternative solution would be to make it possible to specify a channelId to use for this in settings and let the user be responsible for creating the channel themselves if set.
Another option would be to document this behavior so that developers at least knows that this is happening when using presentationOptions and instead handle foreground notifications themselves if they do not want the current behavior.
The text was updated successfully, but these errors were encountered:
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.
Feature Request
Plugin
"@capacitor/push-notifications": "4.1.2",
Description
If presentationOptions are given in the capacitor config, the push notification plugin automatically creates a notification channel to use for those foreground notifications, with a hard-coded name and description ("Push Notifications Foreground" / "Push notifications in foreground"). This is quite unexpected, especially if the app is internationalized and/or specifies its own channels.
Platform(s)
Android
Preferred Solution
Push notifications in foreground should hade the same behavior as other push notifications, and use the "regular" default notification channel if no channel is specified on the notification.
An issue with this solution is however that a notification channel might be needed in order to use the "sound" option for
presentationOptions
.Alternatives
An alternative solution would be to make it possible to specify a
channelId
to use for this in settings and let the user be responsible for creating the channel themselves if set.Another option would be to document this behavior so that developers at least knows that this is happening when using
presentationOptions
and instead handle foreground notifications themselves if they do not want the current behavior.The text was updated successfully, but these errors were encountered: