9

Is GamesClient.submitScore require online connection? How exactly is it working when user is offline? Scores to submit are saved in some sort of queue to execute when there is something to do or I must first save scores locally and then update it on Google Play GAme Services?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Marcin K.
  • 91
  • 1
  • 2
  • 3
    from docs: `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.` from `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).` from `OnScoreSubmittedListener` – Selvin Jun 25 '13 at 22:51
  • So generally i can rely fully on if (isSignedIn && isSupported ) before launching submit score ? – Marcin K. Jun 25 '13 at 23:01

1 Answers1

3

yes it requires a network connection. However what you could do is use SharedPrefrences for when the user signs back in. This is what I did in my app. you just have to make sure the same person who is playing offline is the same one who will sign in later.

Hope this helps!

Jackson Welch
  • 173
  • 11