1
votes

I want to send rich push notifications to mobile devices. I mean when a user receives a push notification, device could display media attachments like image or video (e.g. https://medium.com/@tsif/ios-10-rich-push-notifications-with-media-attachments-a54dc86586c2).

Does Amazon SNS push notification supports such functionality with rich pushes?

1
Have you tried it? My (poor) understanding is that the push simply contains data, but it is up to the application to display it in an appropriate format. From the article: "The apple push notification service sends remote notifications for your apps to each user’s device. At that point, iOS takes over and makes sure the notification is delivered to your app...The media-url key contains the url of your media attachment which you’ll be using in your code." So, simply add the desired information to the SNS message. There is no pre-defined format that you must use. - John Rotenstein
@JohnRotenstein thank you for your input. Unfortunately, I haven’t tested rich push yet. I want to understand that SNS supports all required our features, and only after that invest development time in proof of concept. - Vasyl Sarzhynskyi

1 Answers

0
votes

I verified it, and rich push actually works fine. SNS just send payload, and its responsibility of mobile application to handle received payload in an appropriate way. For example, the following Android payload could be parsed, and app extract the key rich-push-image (or any other key) for rich push :

{
  "GCM": "{ \"data\": { \"body\": \"SNS body\",  \"title\": \"SNS\", \"rich-push-image\": \"xxx.jpg\" } }"
}