-
Notifications
You must be signed in to change notification settings - Fork 1.9k
notification event not fired on cold start on Android 5 #469
Comments
Maybe this helps: output of adb logcat|grep -i pushplugin
on Android 4:
after clicking the notification:
|
I'm seeing this same problem with Android 5.1.1. |
The hint in #490 seems to have saved my day: I have now put all the information in data instead of notification and now all of a sudden it all seems to work. Background, foreground and coldstart, on both Android 4 and Android 5 devices it now appears to work! I will make further tests. Maybe the docs should be clearer on what to put where in the GCM message. |
@TonivdW yes, I do need to do better on the docs. |
I have done some more testing and I can now confirm that all issues described above disappeared once I started putting all the information in the data element instead of in notification. |
@TonivdW no, I'm going to close it as I already know what needs to be done and it's being tracked elsewhere. |
hi , i am using cordova android . i am some issue found . wjen application is closed notification is not recive on device. how to solve my problem? |
hello simple solution is use data instead of notification change this
to this
this should fire on.notification in clod start |
This thread has been automatically locked. |
I have two Android test-devices, one is on Android 4.4.4 and the other one is running 5.1.1.
If the app is running in foreground then the notification even is fired ok.
If I send a notification to those devices the message is received and processed while the app is running in background. No problems there.(CORRECTION: further testing shows that the notification event is also not fired when the app is backgrounded)
If the app is not running at all the notification is received by the device and shown in the statusbar. Clicking it opens the app ok. But only on the Android 4 device the notification event is subsequently delivered to the app. On the Android 5 device the event is not fired.
(I'm building with Cordova 5.4.1 and am using the 1.5.2 version of plugin)
The text was updated successfully, but these errors were encountered: