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-09-10 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-09-10 UTC."],[[["\u003cp\u003e\u003ccode\u003ePlayerStatsClient\u003c/code\u003e is used to retrieve player statistics data.\u003c/p\u003e\n"],["\u003cp\u003eIt provides a method, \u003ccode\u003eloadPlayerStats\u003c/code\u003e, to asynchronously load player statistics.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eloadPlayerStats\u003c/code\u003e returns a \u003ccode\u003eTask\u003c/code\u003e containing an \u003ccode\u003eAnnotatedData\u003c/code\u003e object that holds the \u003ccode\u003ePlayerStats\u003c/code\u003e for the current player.\u003c/p\u003e\n"],["\u003cp\u003eYou can force a reload of player statistics from the server by setting \u003ccode\u003eforceReload\u003c/code\u003e to \u003ccode\u003etrue\u003c/code\u003e in \u003ccode\u003eloadPlayerStats\u003c/code\u003e.\u003c/p\u003e\n"]]],["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"],null,[]]