0

Currently I'm using pindpoint sendMessages SDK for sending notifications through the APNS channel and its work fine. By using using SendMessages I can send messages to multiple endpoints.

{
    "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? Thanks.

Shiyas
  • 570
  • 5
  • 11

1 Answers1

1

Disclaimer : I am not with Amazon Pinpoint product team.

All endpoints that are mapped to the corresponding MessageConfiguration will receive the same payload you set hence the same badge count.

If you wish to send a different badge count to each device, you'll have to send a different payload for each device (i.e passing a different badge count to every user).

Note:

Handling the badges isn't APNS or service provider (i.e Amazon Pinpoint) responsibility on this use-case. Handling the data that comes with the Push Notification is for the developer.

aksyuma
  • 2,957
  • 1
  • 15
  • 29
  • Yeah, Thanks for the answer, I was looking for something that I can send notifications on multiple users on a single request instead of sending the request multiple times. – Shiyas Sep 23 '20 at 18:14