2
votes

I am using Amazon SNS Mobile Push. Our first implementation of push notifications will be on Android via Google Cloud Messaging (GCM).

So far, we have the device endpoint registration workflow working perfectly:

Android device resumed -> Obtain GCM Reg ID -> Send Reg ID to server -> Server sends Reg ID to Amazon SNS to obtain Endpoint ARN -> Server stores Endpoint ARN for later use

No problems here! However, the question I'm asking: how do we support users with apps installed across multiple devices when using Amazon SNS Mobile Push?

GCM calls this functionality User Notifications.

Given that we will then go on to support iOS and perhaps devices in China (via Baidu Cloud Push), is there any mechanism built into the Amason SNS API that allows for endpoint 'grouping'?

I have thought about keeping track of the 'User -> Endpoint' mapping on my end - and then sending a message to all the user's endpoints - but this seems like a hack.

Thanks!

2

2 Answers

1
votes

After much searching it appears that there is no such functionality with AWS Mobile Push. You need to keep track of all of a user's registered Endpoint ARNs in your DB if you wish to support sending push notifications to multiple devices per user.

1
votes

Steps in short for AWS:

  1. Register your mobile device tokens with Platform Endpoints
  2. Create a SNS Topic
  3. Create a Subscription with the Topic ARN and Platform Endpoint ARN (here you link your device with the topic). Essentially you will need to create a subscription for each of your devices (or your users).
  4. Publish a message to the Topic and it will be delivered to all the devices subscribed to the topic.

Let me know if this can solve your issue and I will add some more explanation. This article AWS push helped me a lot to move ahead...