gpt4 book ai didi

android - Android GCM 上的 registeredOnServer 状态何时过期?

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:13:15 24 4
gpt4 key购买 nike

我从 logcat 得到了一些调试消息,如下所示:

07-20 15:38:41.007: V/GCMRegistrar(9023): Setting registeredOnServer status as true until 2012-07-27 15:38:41.014

当我打电话

GCMRegistrar.setRegisteredOnServer(context, true);

不知道是什么意思?我应该在 2012-07-27 15:38:41.014 之后再次设置注册服务器吗?有必要吗?如果我应该再次调用 setRegisteredOnServer,我可以延长过期时间吗?我该怎么做?

感谢任何帮助,谢谢。

最佳答案

它在 javadoc 中有解释。参见 here了解详情。

public static boolean isRegisteredOnServer(Context context)

Checks whether the device was successfully registered in the server side, as set by setRegisteredOnServer(Context, boolean).

To avoid the scenario where the device sends the registration to the server but the server loses it, this flag has an expiration date, which is DEFAULT_ON_SERVER_LIFESPAN_MS by default (but can be changed by setRegisterOnServerLifespan(Context, long)).

关于android - Android GCM 上的 registeredOnServer 状态何时过期?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11576214/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com