rails-push-notifications
rails-push-notifications copied to clipboard
Send additional data using this gem
trafficstars
How can you send additonal data like these:
{
"to": "<token>",
"time_to_live": 86400,
"collapse_key": "new_message",
"delay_while_idle": false,
"notification": {
"title": "title",
"body": "this is a noisy test",
"tag": "new_message",
"icon": "new_message",
"color": "#18d821",
"sound": "default"
}
}
using your gem? Thanks
Hi @hugoh1995 This plugin uses ruby-push-notifications gem to actually push the notifications. You can see an example here of how APNS notifications are created. You can add anything you want to that hash as long as it follows the rules. Hope it helps.
@calonso thanks for getting back! I'm looking for an example for Android actually, are there any?
Sure, you have examples for all supported platforms. Hope it helps!