如何接收服务器的反馈
当特定用户的服务器端发生更新时,服务器将通知 通过推送通知给该用户。
假设两个客户A和B是朋友。两者都已注册到服务器。两者在数据库中都有一个消息字段,用于存储从其他人接收到的消息。
B 已向 A 的消息字段发送了一条消息。现在服务器的任务是检查A的消息字段。 如果最近有A的消息,那么服务器会通过发送该消息来通知A。 我该如何解决这个问题。任何建议将不胜感激..
When an update is happening on the server side for a specific user then the server will notify
to that user by pushing a notification.
Let two client A and B are friend. Both have registered to the server. Both have a message field in the database for storing message receiving from others.
B has sent a message to A's message field. Now server's task is to check A's message field.
If there is a recent message for A, then the server will notify A by sending this message.
How can i solve this. Any suggestion will appreciate..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Google 有一个适用于 Android 的推送通知系统,名为 C2DM
请记住这一点系统只是设计来向 A 签名有一条新消息,而不是将完整的消息实际推送到设备。收到通知后,设备应联系服务器以获取消息。
Google has a push notification system for android called C2DM
Keep in mind this system is merely designed to sign A that there is a new message, not to actually push the complete message to the device. After receiving the notification the device should contact the server to fetch the message.