what does gcm.notification.e=1 stand for, into push notification payload on Android?

两盒软妹~` 提交于 2020-01-02 06:16:52

问题


I'm writing an Android application which receives downstream messages from a server using Google Cloud Messaging. When receiving a message with onMessageReceived I print the bundle and read this:

RECEIVED PUSH NOTIFICATION: Bundle[{gcm.notification.e=1, gcm.notification.badge=1, gcm.notification.sound=default, ..etc...

I don't understand the key gcm.notification.e in the notification payload. On Google documentation I didn't find anything like that. Moreover, when sending the message, I usually specify both a notification payload and a data payload. Now I tried to remove the notification payload but I still receive gcm.notification.e=1

Someone can help me understand this key and find a way to remove it? Thanks

EDIT: I found out that sending a message without the notification payload and with content_available=false (I set this to true when working with iOS) then the gcm.notification.e=1 is not received. I receive only the data payload :). However, I still want to know the meaning of this e


回答1:


Maybe this e field stands for enable. If you set it to zero in your server you won't receive the notification payload on Android. For more details se my answer here.



来源:https://stackoverflow.com/questions/35360486/what-does-gcm-notification-e-1-stand-for-into-push-notification-payload-on-andr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!