If you do not flush stats, they will be sent to the service by the operating system.So even if a player leaves your title, and there are pending stat updates, you can be assured these will be updated and reflect in any related Leaderboards or Featured Stats.It is possible for a player to play your title on multiple devices.
Therefore there is no special behavior you must do, if a player is playing your title without an Internet connection. So you would create a stat and associated leaderboard, where lower is better.We will go through an example to tie these concepts together. In other words, this leaderboard would be sorted in ascending order.Your title would keep track of a user's lap times during their play session.You would update the Stats Manager only if they had a lap time lower than their previous best.You can track their previous best in one of the following ways: The service will replace the stat value no matter what.So even if you were to update with a lap time that's greater than their previous best, then their previous best would be overwritten.So please ensure in your title, that you are only sending the proper stat values based on your gameplay scenario.In some cases lower values might be better, in some other cases higher might be better, or something else entirely. You have the option of manually flushing stats via the API.Typically your flow for using stats is: When you call these, the stat updates are cached locally on the device. Please note that if you call this function too often, you will be rate limited.This does not mean that the stat will never get updated.It merely means that the update will happen when the timeout expires.