Description
Feature Request
Support for Action Buttons in Push Notifications Plugin.
Description
Whilst Local Notifications can produce the Action Buttons, it is a workaround, and it relies on the ability of "PushNotifications.addListener(
'pushNotificationReceived'" to run in the background, which it does not. "pushNotificationReceived" only fires when the app is in the foreground.
Platform(s)
[x ] Android
[x ] iOS
[ x] web
Preferred Solution
Just like how LocalNotifications has the registerActionTypes Method, Push Notifications should have the same.
PushNotifications.registerActionTypes({ types: [ { id: 'alert', actions: [ { id: 'read', title: 'Mark as Read' }, { id: 'archive', title: 'Archive Alert', destructive: true }, { id: 'delete', title: 'Delete Alert', destructive: true } ] } ] });
Alternatives
I have looked into triggering the action types via LocalNotificaitons but it does not produce the desired effect as "pushNotificationReceived" does not trigger when the app is running in the background. it only triggers when the app is running in the foreground.
Additional Context
this was closed when it shouldn't have been: ionic-team/capacitor#1938
"pushNotificationReceived" issues: ionic-team/capacitor#1928 (comment)
#200