Closed joaoBeno closed 8 years ago
Hey @joaoBeno ! You are asking the question the right place :smile:
It doesn't look like you are passing your message any content to show on the recipient device. If you want to directly trigger a notification, look into the notification
field.
For iOS devices, additionally, you need to set priority: "high"
.
I would recommend you read through this project's README to get an understanding of how to use it.
To understand FCM you could also check out the documentation: https://firebase.google.com/docs/cloud-messaging/http-server-ref
Hey, thanks, I will try it now! Another quick question: so I will need separate channels for iOS and Android, since in Android I should not be sending priority: "high"
to save some battery, is that right?
Ps.: It worked! 👍
Oh. yeah, I see that I left that sentence hanging a bit. You need to set priority: "high"
if you want the device to receive you notifications even if it isn't in the foreground. So in that case, yes, you would need separate channels for Android and iOS (unfortunately!).
This, at least, was the case last time I implemented notification support for both device types in a system, and I don't think it has changed. You can test and see if it works otherwise :smile:
Hello there, sorry if my question should be elsewhere... I'm finishing an simple iOS app I did to learn Swift, and I can't get my server to send a topic message to my device, but the message arrive if I send it trough the Firebase Panel... My code:
What I'm missing? this code works on (Some) Android...