I'm using Java gcm-server to send messages to Android client apps, and I would like to send a message to a specific topic as showed here.
My problem is that I only managed to send a message using the Sender class, to a list of registration_ids, and I can't figure out how to use parameter "to": "/topics/myTopic" (I read the source code and it seems it is not implemented).
Any advice?
Yes,Right Now... Not Implemented yet,
you need to make a HTTP POST request to :
https://android.googleapis.com/gcm/send
with body
{ "data": { "title": "Test Title", "message": " Your Message" },
"to" : "/topics/global"
}
For more Help - https://github.com/googlesamples/google-services/blob/master/android/gcm/gcmsender/src/main/java/gcm/play/android/samples/com/gcmsender/GcmSender.java
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