【发布时间】:2015-08-07 09:16:02
【问题描述】:
我正在使用 Azure 通知中心服务。现在,该实现可以发送给所有在通知中心注册的客户端。但是,我不能发送给特定的人。我知道TAG Feature 但是,文件说这似乎是针对特定兴趣群体的解决方案。即使它适用于特定的人,我也想知道是否有其他方式可以向单个客户端发送消息。
以下代码是有效载荷和向客户端发送消息的函数。
var payload =
{
"data":
{
"message":"Notification Hub test notification"
}
};
notificationHubService.gcm.send(null, payload, function(error){
if(!error){
//notification sent
}
});
我做了什么
notificationHubService.gcm.send(GCM 注册 ID,有效载荷, 函数(错误){});
var payload =
{
"register_ids": "device register id"
"data":
{
"message":"Notification Hub test notification"
}
};
【问题讨论】:
标签: android node.js azure google-cloud-messaging