-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Android 5.1] Case study: depending on notif payload, onNotification
callback not called when notif clicked while app in background
#746
Comments
Actual behaviorSo depending on the payload in node-gcm, the plugin behaves differently. Sometimes, the Accidentally, since I'm also using a webintent plugin, registered as Though I think, the presence of webintent plugin is not the reason of the bug. When I remove the webintent plugin from the app, no callback is still called, So here are the different cases: 1a) [onNotification] is called
1b) [onNotification] is called
And here's how different cases look in the UI: |
I originally tested with 1.5.3 but the behavior is identical in 1.6.0 |
You can also see in one of the cases the icon is not displayed, I opened #747 for that |
onNotification
callback not called when notif clicked while app in backgroundonNotification
callback not called when notif clicked while app in background
onNotification
callback not called when notif clicked while app in backgroundonNotification
callback not called when notif clicked while app in background
@jakub-g Yeah, the problem is when you add the |
Hello, i noticed when i avoid to set notification (as said before), the phone receives the push, but it comes empty (no title, no body, no sound) on the notification drawer. The title, body and sound are defined on the data object. The strange behavior is that it works for the first message that arrives on the message bar (it comes with title, body and sound), but the others come empty. Any idea how to solve it? |
Expected Behaviour
The
onNotification
callback should be fired when user clicks the notif in notification drawer, regardless if the app was not in foreground / background / not runningActual Behaviour
When the app is in background when user clicks the notif, or the app was started from user clicking the notification, the callback may not get called, depending on the notif payload
Reproduce Scenario (including but not limited to)
Platform and Version
Android 5.1
(Android) What device vendor
Motorola MotoG3
Cordova CLI version and cordova platform version
Plugin version
Sample Code that illustrates the problem
Sample Push Data Payload
Will post separate cases in the next message
The text was updated successfully, but these errors were encountered: