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"
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.