简体   繁体   English

如何使用FCM向我数据库中的用户发送推送通知? 安卓

[英]How to send a push notification to a user that is in my database using FCM? android

For example, I need to send a notification to a particular user. 例如,我需要向特定用户发送通知。 When the user sends me a trouble-message, I will push a notification which notifies him that the trouble will be fix soon. 当用户向我发送故障消息时,我将推送通知,通知他该问题将很快得到解决。

Now, I have already created a push notification but even when the user is logged out it can still receive a notification. 现在,我已经创建了一个推送通知,但是即使用户注销,它仍然可以收到通知。 And when I'm using a different account it can still receive the same notification for the other user. 当我使用其他帐户时,它仍然可以为其他用户收到相同的通知。

please help me create a push notification that will send to a specific-signed-in-user. 请帮助我创建一个推送通知,该通知将发送给特定的登录用户。 Thank you. 谢谢。 (Sorry I'm new here in android.) thank you very much again. (对不起,我是android新手。)再次非常感谢。

You cannot send to a specific user, you can only send to specific devices. 您无法发送给特定用户,只能发送给特定设备。 Your server/app needs to handle the logic of users and keys associated with them 您的服务器/应用程序需要处理用户的逻辑和与之关联的密钥

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM