React-native-push-notification: Amazon SNS push notifications

Created on 19 Apr 2017  路  8Comments  路  Source: zo0r/react-native-push-notification

Hello everyone! Has anyone tried to get remote notifications from Amazon SNS? How did you manage to do that? I'm able to send all my information to Amazon but I don't know how to handle the notifications on my Android app and the documentation here is...useless regarding this topic. Cheers!

Stale

Most helpful comment

I managed to send push notification from SNS, however I, can't see my custom data in message

All 8 comments

Hi @FacuAcosta

I've a same issue ,
If you have any docs or simple sample application could you please share with me

I managed to send push notification from SNS, however I, can't see my custom data in message

@arunkumarrmrj @KatSick How were you able to do that?

@KatSick did you manage to figure out how to see the custom data?

@lukebrandonfarrell nope :(

@KatSick I figured it out. I'm using wix/react-native-notifications instead of zo0r/react-native-push-notification for a start. The message has to be formatted in SNS as such (for example using APNs).

{
"APNS_SANDBOX":"{\"aps\":{\"alert\":\"My message\"},\"custom_id\":\"1234\",\"custom_name\":\"my_data\"}"
}

The underlying problem was with the way I was using AWS SNS. Using message attributes instead of JSON payloads. This could potentially work with zo0r/react-native-push-notification, although I have not tried it.

@lukebrandonfarrell this is awesome!

The JSON payload:

{
"GCM": "{ \"data\": { \"message\": \"Test\", \"foo\": \"Bar\" } }"
}

Generates this notification:
image

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anativ picture anativ  路  3Comments

nidzovito picture nidzovito  路  3Comments

Benzer1406 picture Benzer1406  路  3Comments

NiuQiaoling picture NiuQiaoling  路  3Comments

halaharr picture halaharr  路  3Comments