Using Java gcm-server to post a topic

I use Java gcm-server to send messages to Android client applications, and I would like to send a message on a specific topic as shown here .

My problem is that I was able to send the message only using the Sender class to the register_ids list, and I cannot figure out how to use the "to" parameter: "/ themes / myTopic" (I read the source code and it seems that it doesn’t implemented).

Any tips?

+4
source share
1 answer

Yes, right now ... Not implemented,

you need to make an HTTP POST request:

https://android.googleapis.com/gcm/send

{ "": {    "title": "Test Title",    "message": " " },

"to": "/themes/global"

}

- https://github.com/googlesamples/google-services/blob/master/android/gcm/gcmsender/src/main/java/gcm/play/android/samples/com/gcmsender/GcmSender.java

+4

All Articles