Is it ok to send all 1500 (or perhaps soon 2000-3000) push notifications in one request to google or should they be split in bunches of 100 or so?
The total amount of bytes a request needs is limited.
I have in mind 4k payload or so... But i´m not sure. I just have in mind that i read it somewhere deep in the gcm-documentation...
Edit:
Every message sent in GCM has the following characteristics:
- It has a payload limit of 4096 bytes.
- By default, it is stored by GCM for 4 weeks.
But i do rememder also that there is a limit on a request...
Edit2:
Sending Messages
Here is the general sequence of events that occurs when a 3rd-party application server sends a message:
- The application server sends a message to GCM servers.
- Google enqueues and stores the message in case the device is offline.
- When the device is online, Google sends the message to the device.
- On the device, the system broadcasts the message to the specified Android application via Intent broadcast with proper permissions, so that only the targeted Android application gets the message. This wakes the Android application up. The Android application does not need to be running beforehand to receive the message.
- The Android application processes the message.
The following sections describe the basic requirements for sending messages.
Target
Required. When your app server sends a message in GCM, it must specify a target.
For HTTP you must specify the target as one of:
- registration_ids: For sending to 1 or more devices (up to 1000). When you send a message to multiple registration IDs, that is called a multicast message.
- notification_key: For sending to multiple devices owned by a single user.
For CCS (XMPP):