I want to send push notification to android app in database trigger MongoDB Stitch. In MongoDB Stitch Console there is a push notifications control and I can send new notification in there. But I want send new notification in triggers. Can you help me to find any tutorial about this. Thank you!
Asked
Active
Viewed 856 times
1 Answers
1
You can do this in a Stitch function by doing:
context.services.get("gcm").send({
"userIds": ["<userId>", ...],
"priority": "normal",
"notification": {
"title": "hello, world",
...
}
});
These are just some of the fields you can use. You can find the rest in the docs. I also found a blog post that isn't really what you're trying to do but might still help.

haley
- 1,165
- 7
- 13