如何设置在C2DM消息超时/到期? [英] How to set a timeout/expiration on a C2DM message?

查看:107
本文介绍了如何设置在C2DM消息超时/到期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个TTL或到期或C2DM消息某种超时功能?

Is there a TTL or expiration or some sort of timeout feature for C2DM messages?

我想C2DM消息10分钟内由该装置要接收的,任何较长(即:如果他们的手机是关闭)。并且不应由该装置接收的C2DM消息

I would like the C2DM message to be received within 10 minutes by the device, any longer (ie: if their phone is off) and the C2DM message should not be received by the device.

我大概可以实现一些在设备忽略任何C2DM的消息,如果他们都老了,但我不知道如何准确,这将是与不同的设备时间设置。

I could probably implement something in the device to ignore any C2DM messages if they are old, but I'm not sure how accurate that would be with different device time settings.

发送到谷歌的C2DM消息,TTL标志将是完美的,但不知道他们是否支持这一观点。

A TTL flag on the C2DM message sent to google would be perfect, but not sure if they support this.

干杯! 戴夫

推荐答案

C2DM不具备这样的功能。请看看这里:

C2DM does not have such a feature. Please have a look here:

<一个href="http://stackoverflow.com/questions/9595230/how-to-set-valid-time-period-for-android-c2dm-message">how设置有效时间段为Android C2DM消息?

更新:

谷歌刚刚发布C2DM的新版本,称为谷歌云消息(GCM)。与GCM可以使用超时为您的消息:

Google just released a new version of c2dm called "Google Cloud Messaging (GCM)". With GCM it is possible to use a timeout for your messages:

我真的建议在谷歌I / O 2012谷歌云消息传递的Andr​​oid的会议可在这里: http://www.youtube.com/watch?v=YoaP6hcDctM

I really recommend the Google I/O 2012 "Google Cloud Messaging for Android" session available here: http://www.youtube.com/watch?v=YoaP6hcDctM

此外,你可以通过GCM TTL部分阅读developer.android.com/guide/google/gcm/adv.html#ttl

Additionally you can read through the GCM ttl section: http://developer.android.com/guide/google/gcm/adv.html#ttl

这篇关于如何设置在C2DM消息超时/到期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆