I've implemented push notifications in my Android app and am trying to build out the server-side to make it more scalable. Looking at the documentation on how to construct the POST to send a push, it seems I need to send a POST for every single user. So if I have 1000 users, I need to send 1000 POSTs, even if the push payload is identical.
Since I'm sending this to Google and they're processing it anyway, I figure it's not unreasonable to hope that I can send a single POST and have Google parse the client tokens and send a push per token. I don't see a way to include multiple tokens in a single POST. So correct me if I'm wrong, but I'll need to continue what I'm doing today, sending a push for every single user...correct?
Thanks in advance.
Google Push documentation
That's correct. Since one of the parameters of the push is the id of the registered device, you can only push to one device at a time.
To anybody still looking at this question - there is now a solution! With the release of Google Cloud Messaging you can now send multicast messages:
http://developer.android.com/guide/google/gcm/gcm.html
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