Closed sunojvijayan closed 8 years ago
@sunojvijayan You can send push notifications to devices that subscribed to a topic with node-gcm.
However, subscribing to topics needs to happen on the device, not on the server.
The following code sends a message to all devices that subscribed to a topic:
// Send to a topic, with no retry this time
sender.sendNoRetry(message, { topic: '/topics/global' }, function (err, response) {
if(err) console.error(err);
else console.log(response);
});
Thanks eladnava. Thanks a lot for your help. I am using phonegap-plugin-push on the client side. Not sure if it supports registering to topics. Can anyone suggest any good plugin for the client side that supports multiple topic registration. Thanks in advance.
@sunojvijayan It isn't supported yet, according to this issue: https://github.com/phonegap/phonegap-plugin-push/issues/79
Hello, It seems that subscribing to topics is not implemented.
You may be able to find another client library for phonegap, however, I am not aware of one.
I think this issue is resolved :)
Will it be possible to subscribe to topics and send topic based push using this plugin. I was wondering that in that case we could avoid sending registration ids along with push and send push on a topic and let Gcm do all the id handling. Is this possible?