I am a newbie to AWS and am exploring it for a mobile application targeted for Android and iOS platforms.One of my application's requirement is to provide push notifications wherein users subscribe to particular topic(s) and then get notifications for those topics.I had gone through Amazon SNS which intends to do exactly the same. Moreover, I have also tested sending push notifications to registered devices from AWS console. This works like a charm.
However,this is a manual process and I want this to be dynamic but without using an intermediate server. Rather I want to do this from the device(s) themselves using AWS Android, iOS SDKs. Thus I have following queries-
Can the Topics for SNS push notifications be created from within app?
Can Subscriptions to a particular topic be managed from the app itself?
Most importantly can push messages be published from devices to all subscribed devices of that topic?
Thanks in advance !
I am currently working on AWS SNS on iOS, and the answer to your questions are :
YES, topics can be created from within the app itself
YES, Subscriptions can be managed from the app also
YES, Push messages can be published from devices to all subscribed devices of a topic.
Please correct me if I'm wrong. And let me know if sample codes are needed.
Thank you.
Related
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
I read a lot of articles about how to implement Push Notifications with Cordova (and Ionic 2) and I'm not sure how to implement that in China when not using Google's push server.
I think using https://github.com/phonegap/phonegap-plugin-push is a good idea. But all the Howtos are focussing on creating an account in Google's FCM which is not really helpful in China. I doubt Chinese phones use Google to poll for notifications. Which leads to my next question.
I was assuming that there exists only one central push service for all platforms (Android, iOS and Windows) and vendors for the following reasons:
One platform is only polling from one fixed push server to save battery life.
If an app (server side) is sending a push notification, it does not know anything about the receiver's device, so it can only count on a centralized service delivering the message to the device regardless of platform or vendor.
But do Apple, Google and Microsoft all use the same push service? I doubt it, and that's what makes me confused. Also, if I'm in China, as Google's services are unstable here, the Android phones distributed in China are not using Google and even not install Google Play Store.
When I install a Chinese app (hosted in China) on a German phone (Android) I still get all notifications for that app even if I'm obviously polling from Google's push server. That means, the notification messages of the Chinese app is somehow delivered to Google.
The only explanation for that is that the different push services are working together. Is that the case? If so, than does it make a difference where I create an account (Google FCM: https://medium.com/#ankushaggarwal/gcm-setup-for-android-push-notifications-656cfdd8adbd#.rr2lfivfh), it is still usable on different push servers? Also, when I send a notification, could I use any server all over the world?
How can I find out which push server my phone is connected with (Android)?
A lot of confusing here, I really appreciate if someone could bring light to that topic :-)
The reason GCM / FCM does not work in China is simply because the Great Firewall of China blocks connectivity to all the various Google services, FCM included.
Also, most, if not all, China-sold phones do not come with Google Play Services, a requirement for FCM to work.
Even if you were to take a German phone, as you mentioned, into China, it would not receive notifications albeit having Google Play Services, due to the firewall.
But there are alternative push notification gateways you could use instead, which are far more reliable and do not depend on Google Play Services. One of those is Pushy.
Pushy (https://pushy.me/) offers a highly-reliable push notification gateway for Android apps that works independently from FCM, using its own background MQTT connection. It also offers iOS support so you can push all of your users via a single API for cross-platform support.
Full disclosure: I founded Pushy.
With Cordova, you can use the plugin cordova-plugin-xiaomi-push done with the Xiaomi Android SDK. I have tested and it works well with all the phones when the application is running. And even when the app is closed with Xiaomi phones :)
The advantage to use Xiaomi is that their developer website is in English and their server's APIs are simple.
There are also 2 plugins for Huawei and Oppo, which work well with the respective brand phones, even if the app is closed. But the API side is more complicated than with Xiaomi. To cover all the supplier with notifications when app is closed, it seems necessary to build one version per manufacturer/stores which include the required plugin (That is possible using a bash script) + build a push server that would send the notification to the right provider.
Google FCM notification not works in china country. You have to use some different push notification provider like Pushy.
For China Country, I used pushy service. You can go through this link if you wanna interested to use pushy service. Please check this link.This will help you
At the moment I have an android app on the Play Store and on the Amazon Store.
I need to implement push notifications and I need to use Amazon Simple Notification Service.
I've already implemented the Android part and it's all ok, but when I run the app on an amazon device push notification system doesn't work. I've discovered that GCM is not supported by Amazon devices. (nice..)
So, I guess that what I need to do is that my android app utilizes GCM if running on an Android Device and ADM if running on an amazon device.
Is it possible to do that with a single application? Is there anybody who did this in the past? I can't find a lot on the internet regarding this topic
Thank you very much for helping me
Yes using GCM on Android and ADM on Amazon devices is the correct way to go. For using ADM with SNS, this guide will probably help http://docs.aws.amazon.com/sns/latest/dg/mobile-push-adm.html
As far as using a single application, it looks like others have asked this and it's not the best approach but it seems like it can work. Checkout
Is it possible to reliably detect at runtime which store installed an Android App (Google Play or Amazon Market)?
Detect app is running on Kindle Fire
Hope this helps
I'm currently working on an application build on AWS. At first, the application was on Parse server and the push notifications were not a problem but then, when I migrated to AWS I encountered some issues with that.
As far as I read from this link http://aws.amazon.com/articles/9156883257507082 I learned that I need to create a topic to subscribe users by creating endpoints using the device tokens from where they are currently logged in.
I will have many users, and the notifications will be sent to all endpoints from a topic.
The problem is when I want to send a notification I want to exclude some users from a topic for receiving that, for example, when a user posts something I will not send a notification to him too. This is available also when I have a custom audience to send notifications to. I could create a topic for every event notification to be sent but I don't think this is a efficient method.
Is there a possibility to do that or Amazon does not even support this feature? Until now I didn't find anything on internet that can help me solve this problem and I hope I'll find here someone who worked with this.
Thank you for your time!
Plus : I also found a similar question here Send Push Notifications using Amazon SNS service but I still don't have a certain answer or some links about that.
From what I've found in AWS documentation, it states that
Send messages directly to a specific device by calling the Publish function with the device’s ARN. You can easily scale this to handle millions of users by storing the endpoint ARNs in Amazon DynamoDB and using multi-threaded code on the server.
Thus, to be able to filter users that receive notifications and not send bulk messages to all users subscribed to a topic, you need to send messages using the device's ARNs.
You can find more info here
I'm trying to create application for Android and iOS and, i want to use push notification on both the application. I'm going to have a server app that will be sending the notification.
but i am trying to APNS and Parse SDK it's common to use ,but i want GCM through push notifications on iOS ,can you please how can it possible ,any such information about GCM to iOS push notifications ,i am googling but i want some suggestions for GCM through iOS device notifications.Can you help me.thank you.
There is very good descriptive instructions in Google Cloud Messaging for iOS guide. It shows whole flow from registration of device token to receive push from server with code example.
After go through above guide, you may go for Setting up a GCM Client App on iOS and you are almost done to use GCM with iOS application
Update: GCM now supports IOS. See Grigo´s comment.
GCM is Android specific. If you want to avoid dealing with 2 different services for IOS and Android, you can use something like Amazon SNS for example. SNS now supports pushing cloud notifications to Android, IOS and Windows devices via the AWS Mobile SDK.