Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification not coming in notification Area #180

Closed
purnendu9 opened this issue Nov 19, 2015 · 5 comments
Closed

Notification not coming in notification Area #180

purnendu9 opened this issue Nov 19, 2015 · 5 comments

Comments

@purnendu9
Copy link

Hi,
I am trying to send messages. The messages are getting sent to the app. However the messages are not appearing in the notification area on top drawer.

The message object that gets sent is as below
{"collapseKey":"Updates Avaliable","priority":"high",
"contentAvailable":true,
"delayWhileIdle":true,
"restrictedPackageName":"XXXXXXXXXX",
"data":{
"key1":"message1","key2":"message2","eventName":"ar","message":"Test Is this coming","route":"XX"
},
"notification":{"title":"Hello from XX","icon":"mrkr1.png","body":"There is a New Appointment from My Best Guest"}
}

When it reaches the client i see this object received is as below

{"title":"Hello from XXX","message":"Test Is this coming","additionalData":{"e":"1","icon":"mrkr1.png","key1":"message1","key2":"message2","eventName":"ar","route":"XX","collapse_key":"XXXX","foreground":true}}

Researched at lot of places as to how to get the event appear in notification Area as well. Documentation does not say musch about it also

@hypesystem
Copy link
Collaborator

How does your code look on the client side? Are you using the regular Android SDK?

This problem is likely because your client-side code does not support the notification field yet, because you are not using the GcmListenerService.

@purnendu9
Copy link
Author

its phonegap sdk
exactly similar to #62
It may be something to do with the phonegap SDK but why should it work differently
The git link for this is https://github.com/phonegap/phonegap-plugin-push

@hypesystem
Copy link
Collaborator

There have been issues with PhoneGap not supporting the notifications field previously. You should probably manually create the notification client-side based on the payload in data.

This is a PhoneGap Push plugin issue so I am closing it.

@purnendu9
Copy link
Author

You are right,
Its not node gcm issue. However i debugged and was able to solve it. Just incase anyone stumbles here,
The Phonegap plugin needs the 3 notification fields. phonegap plugin reads the title and the icon from the "notification" object however the message needs to be set in the "data" object.

Thanks for clarifying

@eladnava
Copy link
Collaborator

@purnendu9 Thanks for clarifying, I'm sure it will help other people in the future!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants