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

How to send messages to a topic? #28

Closed emaillenin closed 8 years ago

emaillenin commented 8 years ago

As mentioned here - https://developers.google.com/cloud-messaging/topic-messaging

ghost commented 8 years ago

no gem support for sending messages to topics?

alwaysanirudh commented 8 years ago

I have done some modifications to handle topics. https://github.com/spacialdb/gcm/pull/33

mangar commented 8 years ago

Hey. I've forked and implemented it. There are some documentation on readme. Hope it can help you as helped me. (https://github.com/mangar/gcm)

gcm = GCM.new("my_api_key") options = {data: {title: "Title", message:"Message"}}
gcm.send_topic("TOPIC_NAME", options)