How to send push notification Firebase direct from

2019-09-20 09:53发布

I want to send a push notification when an event happens in my app, without using the Firebase console for this. Can I send a request by json to the server? And if so, how? Because I have difficulties in this part.

Thank you

1条回答
做个烂人
2楼-- · 2019-09-20 10:34

You can send upstream messages from your app to Firebase Cloud Messaging. But you will need your own app server to respond to those messages. I recommend reading the documentation on the role of these servers.

Since you cannot send direct device-to-device messages with Firebase Cloud Messaging, an alternative for some developers is to use the Firebase Database for keeping a queue of the messages. You'll still need an app server to read that queue and send the downstream messages to the devices, but at least you won't have to learn XMPP.

查看更多
登录 后发表回答