我正在尝试使用Bluemix Services Push REST API中的消息服务向订阅了先前创建的标签的用户发送推送通知。问题是当我向多个标签发送通知时,如果用户注册了多个标签,他会多次收到相同的通知。
API 是这样说的:
tagNames (Array[string], optional): Send notification to the devices that have subscribed to any of these tags
所以我知道用户应该只收到一个通知,而不是正在发生的事情。
我的电话看起来像这样:
{
"message": {
"alert": "Text notification",
},
"target": {
"tagNames": ["TAG1","TAG2","TAG3","TAG4","TAG5","TAG6","TAG7"]
},
"settings": {
"apns": {
"badge": 1,
"sound": "UILocalNotificationDefaultSoundName"
}
}
}