According to https://developers.google.com/cloud-messaging/server-ref gcm message can have notification payload or/and data payload What is the difference between these two?
Reading on the link you send it is explained under Payload section
Payload
Optional. If you are including a payload in the message, you use the data parameter to include your custom key/value pairs. The client app handles the data payload for display or other processing purposes.
The notification parameter with predefined options indicates that GCM will display the message on the client app’s behalf if the client app implements GCMListenerService on Android, or if the notification message is sent to an iOS device. This applies for both HTTP and XMPP.
The app server can send a message including both notifications and data payloads. In such cases, GCM handles displaying the notification payload and the client app handles the data payload.
See the Server Reference for details on sending and receiving messages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With