1

Set up: I have a system which has multiple users. Each user will download my app onto their Android phone and use it. What I want is when any user performs a specific action (I have two in my app), I want to pop up a notification in all the other user phones.

A simple break down is like this: Start app --> Navigate to the part where action is performed --> Perform the action --> Store the action the a DB --> Notify ALL USERS --> Pop up the same notification on all phones.

How would I go about this problem? Can anyone suggest ideas or links, cause I don't even have a clue on how to approach this.

4

2 回答 2

1

如果您希望向所有用户发送通知,即使所有用户都没有积极使用该应用程序,那么 Puch Notification 也是一个好方法。

推送通知让您的应用程序通知用户新消息或事件,即使用户没有积极使用您的应用程序。在 Android 设备上,当设备收到推送通知时,您的应用程序的图标和一条消息会出现在状态栏中。当用户点击通知时,它们会被发送到您的应用程序。通知可以广播给所有用户,例如营销活动,或仅发送给一部分用户,以提供个性化信息。

看看Android 谷歌云消息传递

我还发现XMPP是本文所述一个很好的解决方案。

你会在这里这里找到一些好的解决方案

于 2012-12-26T05:46:57.433 回答
0

Well, you will need a database on a server, and then you will need the app to constantly (or at intervals) query the database in the background for changes, and notify the user when it finds one. A system similar to how many apps give notifications is what I am getting at.

于 2012-12-26T01:06:08.420 回答