how to track opened push notifications delivered by Amazon SNS - android

Hi does amazon SNS support tracking of opened push notifications?
If not, is there a third party analytics service that can track opened notifications in apps (ios android) and combines count of delivered notifications from amazon SNS?

Message delivery can be tracked using Amazon SNS Delivery Status and Amazon CloudWatch:
You can capture information on success rates, failure rates and dwell times for mobile push notifications using Amazon SNS Delivery Status. These metrics provide insights such as whether your push notifications have been successfully delivered to the intended messaging platform and the time it took for the notifications to be delivered. In addition to collecting status information, you can also trigger alerts based on metrics you define in Amazon CloudWatch.
You can enable this feature by simply selecting to receive “Delivery Status” for your applications in the Amazon SNS console. After this is enabled, the information is captured in an Amazon CloudWatch Logs group that is automatically created by Amazon SNS on your behalf.
See the initial announcement of this feature.
It’s also described here in this AWS YouTube video:
How do I confirm delivery of Amazon SNS Push Notifications and find out why some notifications fail

Related

Push notification - Difference between AWS Pinpoint and AWS SNS

I am new to Push Notification and really interested in it. We have AWS SNS (Simple Push Notification) and AWS Pinpoint.
I am confuse about these services from AWS.
What is the difference between them?
If I want to send push notification to my phone, which one should I
use?
If you have any ideas, please let me know.
Thank you in advanced!
Q. If I want to send push notification to my phone, which one should I use?
A. Both Amazon SNS and Amazon Pinpoint, support push notification feature and I normally like classifying them as "Mobile Push Messaging" tools however they differ in mechanism as discussed below.
The major difference between Amazon SNS & Amazon Pinpoint is addressed by the Pinpoint FAQ
Q: I already use Amazon SNS or Amazon SES. What do I gain by switching
to Amazon Pinpoint?
In typical Amazon SNS and Amazon SES use cases, you have to set up
your application to manage each message's audience, content, and
delivery schedule. These same features are built in to Amazon
Pinpoint. With Amazon Pinpoint, you can create message templates,
delivery schedules, highly-targeted segments, and full campaigns.
Some of the key features offered by Amazon Pinpoint (i.e currently not offered by Amazon SNS) are:
Supports two-way messaging
Understand User Behavior
Supports voice messages
Create Targeted Campaigns
Supports .p8 token authentication for APNs
Measure Results
Hope this helps

SNS Mobile push notifications extremely confused

Right now I'm trying to send mobile push notifications to my phone when someone publishes a message to SNS. I'm confused about what services I have to use. Do I have to use a 3rd party service like Firebase Cloud Messaging/GCM to send mobile push notifications? Or can I send it directly from SNS to my phone.
In AWS docs it's a bit contradicting to me.
https://docs.aws.amazon.com/sns/latest/dg/sns-mobile-application-as-subscriber.html
It says:
To begin using Amazon SNS mobile push notifications, you need
the following:
A set of credentials for connecting to one of the supported push
notification services: ADM, APNS, Baidu, FCM, MPNS, or WNS.
A mobile app that is registered and configured to use one of the
supported push notification services.
So that means we have to use a third party service right? But however in one of the AWS SNS tutorials:
https://docs.aws.amazon.com/sns/latest/dg/mobile-platform-endpoint.html
it says we can create a platform endpoint for my mobile device so that it can recieve push notifications. I am extremely confused, do we have to use a third party service or can we send SNS push notifications directly to our phone?
I checked stackoverflow and the answers are not clear to me either
Can Amazon SNS push notifications directly to mobile devices?
Amazon SNS Sending direct push notification to individual device
Can someone please clarify this for me?
AWS SNS manages and abstracts different push notification services.
For AWS SNS to be able to make use of the appropriate push notification service, it would need a platform endpoint. It would need to know which platform (i.e iOS) an app is built.
it says we can create a platform endpoint for my mobile device
To create a platform endpoint, you would need a certificate coming from the Push Notification provider.
Example: .p12 is a certificate from Apple which will require "Push Notification" feature to be enabled.
Once a platform application is created, the app would need to register a unique device token to AWS SNS.
This device token is generated by iOS or Android to uniquely identify the device. The app can only generate the device token if it's properly signed by a certificate from the Push Notification provider.
do we have to use a third party service
Yes you need a third party service to:
generate the certificate with push notification feature enabled
generate the device token associated with your physical device
properly sign the app using the certificate
or can we send SNS push notifications directly to our phone?
AWS SNS manages this for you by matching device endpoints to the correct device token. Then invoking the appropriate push notification service. (i.e APNS, GCM).

Amazon SNS delivery receipts: do they indicate delivery to mobile or delivery just to the push notification service?

I want to know whether AWS SNS (Simple Notification Service) delivery receipts indicate:
whether AWS SNS delivered the push notification just to the relevant push notification service (e. g. GCM, APNS), or
whether the push notification was actually delivered to the mobile phone of the targeted user
The documentation appears vague on this.
I'd also like to know if, in case the second case above is true, whether the delivery receipts are also delivered when the app has been force-killed by the user.
SNS supports GCM over HTTP only, so you will only know when SNS has delivered the message to GCM not to the device. In order to get a delivery receipt that the message has been received by the device you would have to use XMPP.
See the docs for more.

Is there any specific reason to use Amazon SNS instead of direct Baidu service

I have created push notification using Baidu. It works well through Baidu console and I receives the notification in my Android mobile.
I have to create a webservice to send push message from my specific application by using the SDK provided by Baidu. I have another option which seems to be available under Amazon SNS. It seems like a wrapper to Baidu, GCM etc.
My doubt is is there any specific advantage for using Amazon SNS over the Baidu provided SDK?
tldr;
If you target the chinese market only and Baidu is working well for you and you have all you code setup to work with Baidu, then stay with Baidu
Some other points to clarify about Amazon SNS
Baidu cloud push offers a really good service if you want to send notification on the chinese market
Amazon SNS on the other side is a much larger offering and as part of the Mobile Push Notifications Amazon will act as an abstract layer and you can choose which implementation you want.
It has the following advantages:
You are not limited to Baidu scope so you can send notification on the chinese market but not only and if/when needed to send a notification abroad it will be much easier without rewriting the whole thing
You can use the same code and change quickly the provider for push notification in case the provider does not work at a given time (downtime operations) or if the conditions change and you're not happy with new conditions.
You send push notification messages to both mobile devices and
desktops using one of the following supported push notification
services:
Amazon Device Messaging (ADM)
Apple Push Notification Service (APNS) for both iOS and Mac OS X
Baidu Cloud Push (Baidu)
Google Cloud Messaging for Android (GCM)
Microsoft Push Notification Service for Windows Phone (MPNS)
Windows Push Notification Services (WNS)
The following figure shows an overview of how Amazon SNS is used to
send a direct push notification message to a mobile endpoint.

Should I delete SNS endpoints for GCM?

According to the GCM Advanced Topics, under the part of "How unregistration works", GCM notifies the 3rd-party server that a registration id is no longer registered with the device. When we use Amazon SNS, the 3rd-party is Amazon. What I'm unclear on is SNS does when when GCM sends it NotRegistered for a registration id.
Does Amazon delete the SNS topic? If so, how do I know on my application server to remove my reference to it? If not, how am I expected to clean up my list of SNS topics assigned to a user?
Amazon SNS sets the endpoint to "Disabled". You can subscribe to EventEndpointCreated events to receive this notification.
From the Amazon SNS FAQ:
How does SNS Mobile Push handle token feedback from notification services?
SNS Mobile Push automatically handles token feedback services on your behalf, and exposes the feedback information via events published to a topic you may choose to consume. This approach reduces the operational burden of sending push notifications, and maximizes the speed and reliability with which your notifications are delivered. Push notifications services such as APNS and GCM provide feedback about tokens which may have expired or been replaced by new tokens. When a particular token is replaced by a new token, SNS automatically updates the associated endpoint, and notifies you via an event. When a particular token expires, perhaps because a user deleted your app, SNS marks the endpoint as disabled and notifies you via an event. You don’t strictly need to consume the feedback notifications in order to send push notifications with SNS, but may choose to do so based on your broader use case.

Categories

Resources