Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send additional data using this gem #21

Open
hugoh59 opened this issue Mar 8, 2018 · 3 comments
Open

Send additional data using this gem #21

hugoh59 opened this issue Mar 8, 2018 · 3 comments

Comments

@hugoh59
Copy link

hugoh59 commented Mar 8, 2018

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

@calonso
Copy link
Owner

calonso commented Mar 9, 2018

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.

@hugoh59
Copy link
Author

hugoh59 commented Mar 9, 2018

@calonso thanks for getting back! I'm looking for an example for Android actually, are there any?

@calonso
Copy link
Owner

calonso commented Mar 9, 2018

Sure, you have examples for all supported platforms. Hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants