Push notifications with serverless AWS


#1

I would like to create an app with a push notification functionality. I wanted to use AWS as a backed, serverless architecture etc.

Scenario I got in mind goes somewhat like this: (let’s pretend it’s a game - board with square fields - like in checkers)

  1. phone1 - user clicks a field f1
  2. phone2, …, phone-n - each user sees that f1 was clicked and cannot click this filed - field becomes disabled.
  3. phone4 - clicks field f-12
  4. every other phone gets notified that field was clicked, and field becomes disabled on those devices

#2

Hi @slawek, did you have a specific question you wanted answered?


#3

Yes. Does anyone have any exp doing push notifications with expo + AWS. some code snippets would be very useful. link to docs as well.


#4

Hey @slawek hows it going? This might be a stupid question on my part but have you had a look at this? https://docs.expo.io/versions/latest/guides/push-notifications.html

If so, are you looking for more of a specific working example of push notifications? I’m assuming you are going to write your own push notification server. Is there anything that we are missing from the documentation above?


#5

Hi. Have you guys found an example with AWS Push (Mobile Hub) and Expo?
All Our services are hosted on AWS and I don’t want to use the Expo Push API. Instead, I want to trigger the Push Notification on AWS Mobile Hub and use Expo to Display them. Is it possible?
Tks


#6

To use a custom push notification service you need to get the raw device tokens (standalone apps only) and create a payload in a special format. The format is undocumented and is implied by the source code of the Expo client, however, so use this API at your own risk.