Hello rpostulart, thank you for your guides. Much appreciated.
I would like to share some thoughts.
If we only consider push notifications then Pinpoint isn't really necessary right? Either ExpoServer.
You could go straight ahead and send the payload via fetch in your lambda, like in the Expo Docs:
constmessage={to:this.state.expoPushToken,sound:'default',title:'Original Title',body:'And here is the body!',data:{data:'goes here'},_displayInForeground:true,};constresponse=awaitfetch('https://exp.host/--/api/v2/push/send',{method:'POST',headers:{Accept:'application/json','Accept-encoding':'gzip, deflate','Content-Type':'application/json',},body:JSON.stringify(message),});
So I assume you have included pinpoint only to demonstrate how these tools can be combined in a user engagement case. But unlikely the email delivery you would still not be able to track whether your push notification has been delivered or not, right? Or am I missing something?
Some observations in case people don't figure it out:
This scenario will only work in the Expo Client in Android. For the APK you will need to send push notifications via FCM docs.expo.io/versions/v37.0.0/guid...
On IOS push notifications will only show if the app is on the background.
There is a missing statement in the PolicyDocument in lambaexecutionpolicy from pinpoint-cloudformation-template.json, this needs to be added in order to be able to create an app in pinpoint:
Hello rpostulart, thank you for your guides. Much appreciated.
I would like to share some thoughts.
If we only consider push notifications then Pinpoint isn't really necessary right? Either ExpoServer.
You could go straight ahead and send the payload via fetch in your lambda, like in the Expo Docs:
So I assume you have included pinpoint only to demonstrate how these tools can be combined in a user engagement case. But unlikely the email delivery you would still not be able to track whether your push notification has been delivered or not, right? Or am I missing something?
Some observations in case people don't figure it out:
Thanks rpostulart!
In addition to the missing policy, there is an error in the way the Expo Push Token is written to the API in
./src/Main.js
.Where we define token, the cange is
token
->token.data
: