How to send device to device messages using Firebase Cloud Messaging?

后端 未结 13 1910
Happy的楠姐
Happy的楠姐 2020-11-22 01:47

After searching the docs I could not find any info on how to send device to device messages using FCM without the use of an external server.

For example, if I was cr

13条回答
  •  孤独总比滥情好
    2020-11-22 02:01

    So I had an idea here. See: If the FCM, as well as the GCM, has a endpoit to http request where we can send a post json with our message data, including the token (s) of devices that we want this message to be delivered.

    So why not send a post to Firebase server with this notification to be delivered to user B? you understand ?

    So, you send the message and chat with a call post to ensure delivery of the notification if the user is with your app in the background. I am also in need of it soon, I will test later. What do you say about?

提交回复
热议问题