【发布时间】:2013-06-22 22:13:16
【问题描述】:
GamesClient.submitScore 是否需要在线连接?当用户离线时它是如何工作的?要提交的分数会保存在某种队列中,以便在有事情要做时执行,或者我必须先在本地保存分数,然后在 Google Play 游戏服务上更新?
【问题讨论】:
-
来自文档:
This form of the API is a fire-and-forget form. Use this if you do not need to be notified of the results of submitting the score, though note that the update may not be sent to the server until the next sync.来自GamesClient+STATUS_NETWORK_ERROR_OPERATION_DEFERRED if the device is offline or was otherwise unable to post the score to the server. The score was stored locally and will be posted to the server the next time the device is online and is able to perform a sync (no further action is required from the client).来自OnScoreSubmittedListener -
所以通常我可以在启动提交分数之前完全依赖 if (isSignedIn && isSupported)?
标签: android google-play-services google-play-games