Following the deprecation of the Google Sign-In API, we are removing the games v1 SDK in 2026. After February 2025, you will be unable to publish titles that are newly integrated with games v1 SDK, on Google Play. We recommend that you use the games v2 SDK instead.
While existing titles with the previous games v1 integrations continue to function for a couple of years, you are encouraged to migrate to v2 starting June 2025.
PlayerStatsClient
Stay organized with collections
Save and categorize content based on your preferences.
A client to retrieve Player stats.
Public Methods
public abstract Task<AnnotatedData<PlayerStats>>
loadPlayerStats (boolean
forceReload)
Returns a Task
which
asynchronously loads an annotated PlayerStats
for the currently signed-in player and game into a single result.
Parameters
forceReload |
If true , this call will clear any locally-cached data and attempt
to fetch the latest data from the server. This would commonly be used for something
like a user-initiated refresh. Normally, this should be set to false
to gain advantages of data caching. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-24 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-24 UTC."],[[["`PlayerStatsClient` is used to retrieve player statistics data."],["It provides a method, `loadPlayerStats`, to asynchronously load player statistics."],["`loadPlayerStats` returns a `Task` containing an `AnnotatedData` object that holds the `PlayerStats` for the current player."],["You can force a reload of player statistics from the server by setting `forceReload` to `true` in `loadPlayerStats`."]]],["The `PlayerStatsClient` interface provides a method, `loadPlayerStats`, to retrieve player statistics. This method returns a `Task` that asynchronously loads `PlayerStats` for the signed-in player. The `forceReload` parameter determines data retrieval; if `true`, it fetches the latest data from the server, bypassing the local cache, useful for user-initiated refreshes. Otherwise, when it's `false`, it utilizes cached data. The method outputs a task containing the annotated player statistics.\n"]]