Send push notification from one android app to another using Amazon SNS - android

I am using Amazon SNS for push message in my android app. I want to send push messages from one android app/device to another and I am not able to find any documentation for this. Is there a way I can send upstream message to the server from a device/app which will be delivered to another device.

Related

How to ensure firebase has received push notification sent from app server, without android app

I am new with Firebase. I want to send push notifications to an android app from a spring application. At preset I dont have an android app. I want to test whether the firebase integration is correct or not, which means I want to make sure that the push notifications sent from the backend server are recieved correctly in firebase .
How do I ensure that firebase has recieved the push notifications sent from backend server?
Is it possible to test push notifications without an android app registered on firebase? If yes, how do I do that?
I am using Firebase Admin SDK. Do I need a separate server key other than the service account key for sending notifications?
You'll get a success (or fail) response when sending messages. This means that FCM has received your message and it will try to deliver it to the users.
FCM needs to target your app in order to send notification. If you don't set up FCM SDK in your app, it wont be able to do so.
You just need to generate an auth token. This guide should help you set it up.

send notification to ios and android using FCM Rest Api (New Versio)

I have a net core Back-End (3.1).
I created a page in which admin should enter title and description and pick a user to send a notification.
I want to send notification payload to Apple devices and not to an android device similar to a custom notification.
there is a platform-specific notification in Firebase Cloud Messaging documentation .
However, I was not able to implement it .
If you wanna only send the notification to Apple devices only. Then APNS Push notification push gateway will be suitable for you. See here
Certainly, FCM can also deal with this issue. You need to add the ApnsConfig to your request and send it to the FCM server.
If you cannot implement it, you need to mention more detail about your issue (trace log, exception info, etc.)

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).

Does Android wear 2.0 has its own GCM/FCM Registration ID?

As a part of announcement of Android Wear 2.0 there was declared:
Standalone applications: direct network access to cloud (apps run on
watch even when your phone isn't with you).
The question is does this means that android wear application can get its own GCM/FCM registration ID and receive push notifications directly to the watch without phone at all? Can someone here prove it with documentation or on its own experience?
What happen if I have same applications on the device and watch, that receives push notifications?
Thanks in advance.
It is stated in the documentation of Android wear 2.0 under the Cloud Messaging that for sending notifications, apps can directly use Firebase Cloud Messaging (FCM). Note that FCM is supported on Wear 2.0. and GCM is not supported.
Here are the other details that you can find in this documentation.
FCM is the recommended way to send notifications to a watch.
Provide for messages from FCM by collecting a registration token for a device when your Wear app runs. Then include the token as part of the destination when your server sends messages to the FCM REST endpoint. FCM sends messages to the device identified by the token.
An FCM message is in JSON format and can include one or both of the following payloads:
Notification payload. When a notification payload is received by a watch, the data is displayed to a user directly in the notification stream. When the user taps the notification, your app is launched.
Data payload. The payload has a set of custom key/value pairs. The payload and is delivered as data to your Wear app.

Send text messages from web application to Android device using Amazon SNS

I'm using AWS SNS to push messages to Android devices. Is there a way to send text message from a web application preferably Django to an Android device ? I tried using the boto library but there isn't an example in the documentation for pushing a message to a device. Can someone please point me in the right direction or help me figure out how to do this.
SNS sends email or push messages to phones. It does not send SMS.
You'll need to use a service like Twilio for that.

Categories

Resources