Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的 phonegap 应用程序中,我喜欢调用这个函数,无论是在接收器内部还是在第三方插件内部,我都应该在哪里调用这段代码
https://stackoverflow.com/a/18072720/1482099
你没有理由调用这个函数。
您应该知道GCMRegistrar已弃用。此外,getRegisterOnServerLifespan即使它没有被弃用,它也不是很有用。
GCMRegistrar
getRegisterOnServerLifespan
顺便说一句,该方法与您的链接中的答案应该回答的问题无关。它返回一个任意时间段,在此之后注册 ID 被视为过期,而问题是关于 API 密钥的过期。