android firebase device to device messaging [closed]

∥☆過路亽.° 提交于 2019-12-01 12:32:34

问题


I want to create an app that can simply using firebase allow users to add friends and be able to send one to one messages like whatsapp but with usernames.

I have seen and used the firebase chat example but it doesn't help me understand how to create device to device messaging but instead group messaging between everyone on the app which i don't want.

I have seen many examples of chat apps but all are out of date (PARSE/DEPRECATED FIREBASE) or unclear on how to create it.


回答1:


Firebase does not support direct communication between two devices. You need an additional app server that communicates with gcm. A nice article that helped me to understand the structure can be found here. http://www.grokkingandroid.com/xmpp-server-google-cloud-messaging/. A nice project that worked for me is the friendlyPing example https://github.com/googlesamples/friendlyping.



来源:https://stackoverflow.com/questions/38372147/android-firebase-device-to-device-messaging

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!