Sam Dozor
Sam Dozor

Reputation: 40734

Sending push to multiple android devices with a single POST

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

Upvotes: 7

Views: 1697

Answers (2)

Sam Dozor
Sam Dozor

Reputation: 40734

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

Upvotes: 1

LuxuryMode
LuxuryMode

Reputation: 33741

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.

Upvotes: 1

Related Questions