Send notification to only one user in firebase [closed]

五迷三道 提交于 2020-01-03 08:52:46

问题


I have an android app and I want to send notifications to only one user when data is change. How can I do that. Tell ma part of code I put in OnDataChange() Method.


回答1:


You can make topic for this user and subscribe to that topic then Firebase allow us to send message to specific topic using topic message. Kindly Look at this link

https://firebase.google.com/docs/cloud-messaging/android/topic-messaging

and this

How to send notification to specific users with FCM?

Hope it will help .



来源:https://stackoverflow.com/questions/45135846/send-notification-to-only-one-user-in-firebase

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