In the Android GCM document, it is said that the payload is up to 4096 bytes limit.
Does the payload's 4096 bytes include the registration_id length? I found I could send a message with a payload of 16038 bytes (including the registration_ids).
It doesn't include the registration ids.
I'm sorry for not supplying any supporting documentation. The GCM documentation doesn't state it clearly. However, I tested it in order to verify this behavior. The only "proof" I can supply is that in a multicast message you can include up to 1000 registration ids. A 1000 registration ids obviously cannot fit into the 4096 bytes of the payload.
From http://developer.android.com/google/gcm/gcm.html :
registration_ids
A string array with the list of devices (registration IDs) receiving the message. It must contain at least 1 and at most 1000 registration IDs. To send a multicast message, you must use JSON. For sending a single message to a single device, you could use a JSON object with just 1 registration id, or plain text (see below). Required.
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