0

I have migrated parse server to AWS as per following link;

https://parse.com/migration

For push notification I am using AWS SNS , But my question is how to send push to cross platform.

EX:from ios to android ,from android to ios, from website to mobile devices.

Any help would be appreciated.

2 Answers2

1

You need to do it with server side scripting. You can make an API to send a message to other device and the same webservice can be useful to send message to mobile devices. If you are using PHP on server side, you can follow following links:

iOS : https://www.raywenderlich.com/123862/push-notifications-tutorial

Android : sending push notifications to multiple android devices using GCM

Feel free to ask any further queries if you have.....

EDIT :

You need to communicate to APNS for apple and GCM for android to send a push notification....

To communicate with APNS you would require a .pem file. Please refer this link to get assistance of creation of pem file.

Generate .pem file Used to setup Apple PUSH Notification

Moreover, as per my knowledge, the only way to send push notification is to call a webservice. everything needs to be done on server side.

To send a notification to website, Please refer following links:

  1. https://onesignal.com/ (Fully Free | Support mobile + browser)
  2. https://clevertap.com/ (Has free plan)
  3. https://goroost.com/
Community
  • 1
  • 1
Nirav Gadhiya
  • 6,232
  • 2
  • 33
  • 75
0

You can keep using SNS for this, but as Nirav said you will need to make a server side call to send from device to device. It would be very insecure if your mobile application could send push notifications to other users. If someone decompiled your app they could ruin the app for all of your users.

The easiest way to do this with AWS would be to setup a Lambda function https://aws.amazon.com/lambda/ that your app can call, and use that Lambda function to make calls to SNS to send push notifications. That way your Lambda function can authenticate the user has permissions to send a push to another user (maybe validate they are 'friends' or whatever your app does) and maintain monitoring / a black list to help stop malicious users.

WestonE
  • 662
  • 3
  • 7