[英]Push notifications to Multiple devices using AWS-Pinpoint
Currently I'm using pindpoint sendMessages SDK for sending notifications through the APNS channel and its work fine.目前我正在使用 pindpoint sendMessages SDK 通过 APNS 通道发送通知并且它工作正常。 By using using SendMessages I can send messages to multiple endpoints.通过使用 SendMessages,我可以将消息发送到多个端点。
{
"ApplicationId": "adknjafodnfldsnnflnfnsdfn",
"MessageRequest": {
"Addresses": {
"address1": {
"ChannelType": "APNS"
},
"address2": {
"ChannelType": "APNS"
}
},
"MessageConfiguration": {
"APNSMessage": {
"Title": "Sample Title",
"Body": "Sample Message",
"Sound": "default",
"Badge": 1
}
}
}
}
even if this can send to multiple devices, It uses same badge count.即使这可以发送到多个设备,它也使用相同的徽章计数。 Every address receives same badge count.每个地址都会收到相同的徽章计数。 How can I send different badge count to multiple devices.如何向多个设备发送不同的徽章计数。 Where can I override the Message configuration body, or is there any other SDK available for this?我在哪里可以覆盖消息配置主体,或者是否有其他可用的 SDK? Thanks.谢谢。
Disclaimer: I am not with Amazon Pinpoint product team.免责声明:我不在 Amazon Pinpoint 产品团队。
All endpoints that are mapped to the corresponding MessageConfiguration will receive the same payload you set hence the same badge count.映射到相应 MessageConfiguration 的所有端点都将收到您设置的相同有效负载,因此会收到相同的徽章计数。
If you wish to send a different badge count to each device, you'll have to send a different payload for each device (ie passing a different badge count to every user).如果您希望向每个设备发送不同的徽章计数,则必须为每个设备发送不同的负载(即向每个用户传递不同的徽章计数)。
Note:笔记:
Handling the badges isn't APNS or service provider (ie Amazon Pinpoint) responsibility on this use-case.处理徽章不是 APNS 或服务提供商(即 Amazon Pinpoint)对此用例的责任。 Handling the data that comes with the Push Notification is for the developer.处理推送通知附带的数据是为了开发人员。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.