Android的C2DM消息在App Engine的侧面得到证实侧面、消息、C2DM、Android

2023-09-07 12:01:54 作者:待你长发及腰拿去拖地可好

有没有方法可以让我得到的信息是否C2DM的消息在队列中某个位置在App Engine上侧发送到设备或静止?该设备将无法获得的消息,如果是一些WiFi接入点(随机行为)。

Is there a way I can get the information whether the c2dm message was sent to a device or still in queue somewhere on App Engine side? The device won't get the messages if it's on some WiFi access point (random behavior).

我想实施时间限制的通知消息。如果时间到了,消息就没有任何意义了,永远不能交付。

I want to implement time limit to the notification messages. If the time is up, the messages make no sense anymore and should never be delivered.

推荐答案

您不应该通过C2DM发送信息,无论多么小,直接给用户。 C2DM被设计为用作方式提醒装置,有在服务器上的新信息。然后,您的客户端应与服务器连接,下载相关资料。如果遵循这种设计模式,那么你的客户端和服务器端的code之间,我敢肯定,你可以很容易地计算出,如果消息是陈旧的或没有。

You shouldn't be sending information, however small, directly to your users through C2DM. C2DM is designed to be used as a way to alert your device that there is new information on the server. Your client should then connect with the server to download the relevant information. If you follow this design pattern, then between your client-side and server-side code, I'm sure you can easily figure out if a message is stale or not.