decision-labs / gcm

A gem that helps developers send data from ruby backend servers to their Mobile applications on devices via Google Cloud Messaging (GCM).
MIT License
385 stars 61 forks source link

Question: Are there future plans for multicast support? #7

Closed foundrium closed 11 years ago

foundrium commented 11 years ago

Are there plans to implement multicast support?

kashif commented 11 years ago

Sure let me look at it tonight and i'll push something perhaps in the next two days. Thanks for trying out gcm by the way!

kashif commented 11 years ago

ah yes I remember now..., multicast is supported, you just need to give it an array on registration Ids as in the readme:

gcm = GCM.new(api_key)
registration_ids= ["4", "8", "15", "16", "23", "42"] # an array of one or more client registration IDs
options = {data: {score: "123"}, collapse_key: "updated_score"}
response = gcm.send_notification(registration_ids, options)

hope this helps!

foundrium commented 11 years ago

Awesome, I will give it a shot and let you know if I have any issues. Thanks for the open source!