Bug Report
Plugin(s)
@capacitor/push-notifications 7.0.0
Capacitor Version
Latest Dependencies:
@capacitor/cli: 7.1.0
@capacitor/core: 7.1.0
@capacitor/android: 7.1.0
@capacitor/ios: 7.1.0
Installed Dependencies:
@capacitor/android: 7.1.0
@capacitor/cli: 7.0.1
@capacitor/ios: 7.1.0
@capacitor/core: 7.1.0
Platform(s)
Current Behavior
Expected Behavior
The method pushNotificationReceived is only called sometimes on Android.
Code Reproduction
PushNotifications.addListener('registration', (token) => {
// working fine
})
PushNotifications.addListener(
'pushNotificationReceived',
(notification: PushNotificationSchema) => {
// only working on Android when sending via debugging firebase cloud console
}
)
// Method called when tapping on a notification
PushNotifications.addListener(
'pushNotificationActionPerformed',
(notification: ActionPerformed) => {
// working fine
}
)
Other Technical Details
All methods work perfectly on both Android and iOS. On Android, I can easily respond to the listeners for pushNotificationActionPerformed and registration. However, pushNotificationReceived is only called on iOS, while on Android, it is only triggered occasionally.
Perhaps this information helps with debugging:
When I send notifications to FCM via their API, they only work on iOS. However, when I send test messages directly through Firebase debugging, they work on both platforms.
Additional Context
Samsung Galaxy S24
Android Version 14
Bug Report
Plugin(s)
@capacitor/push-notifications 7.0.0
Capacitor Version
Platform(s)
Current Behavior
Expected Behavior
The method
pushNotificationReceivedis only called sometimes on Android.Code Reproduction
Other Technical Details
All methods work perfectly on both Android and iOS. On Android, I can easily respond to the listeners for
pushNotificationActionPerformedandregistration. However,pushNotificationReceivedis only called on iOS, while on Android, it is only triggered occasionally.Perhaps this information helps with debugging:
When I send notifications to FCM via their API, they only work on iOS. However, when I send test messages directly through Firebase debugging, they work on both platforms.
Additional Context
Samsung Galaxy S24
Android Version 14