问题描述
我将在同一个零售点的工作两款Android平板电脑,同时连接到本地网络。
I will have two android tablets working in the same retail location, both connected to a local network.
一个客户将使用一个平板电脑订单。这种平板电脑需要将通知发送到当订单被放在另一个片剂。
A customer will use one tablet to place an order. That tablet needs to send a notification to another tablet when the order is placed.
我使用的MySQL数据库,我可以从需要接收信息时,平板电脑不断查询,但这样会耗尽电池。
I am using a MySql database, and I could poll constantly from the tablet that needs to receive information, but that would drain the battery.
我可以使用C2DM,但它是绝对必要的系统工作,即使有连接互联网放缓/损失。
I could use C2DM, but it is absolutely necessary that the system works even if there is an internet slowdown/loss of connectivity.
我怎么可以做什么基本上是C2DM超过从Android设备本地网络的Android设备?没有Android设备将拥有移动电话服务。
How can I do what is basically C2DM over a local network from android device to android device? No android device will have cell phone service.
推荐答案
您已经问了一个普遍的问题,所以我可以做的最好的是给你一个笼统的回答。传统上,已经在这种情况下使用。从本质上讲,第一片轮询第二片。当第二个平板电脑获取轮询请求它只是坐在它,直到它实际上有事情要告诉其他设备。一旦它具有一个信息要发送到另一台设备,它响应该初始轮询请求
You've asked a general question so the best I can do is give you a general answer. Traditionally, Long Polling has been used in this situation. Essentially, the first tablet polls the second tablet. When the second tablet gets the poll request it just sits on it until it actually has something to tell the other device. Once it has a message to send to the other device, it responds to that initial poll request.
这篇关于从设备推送通知到设备上的本地网络,无需C2DM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!