Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 913
Andrea Avatar asked Oct 18 '22 15:10

Andrea


1 Answers

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.

like image 137
dblank Avatar answered Nov 15 '22 07:11

dblank