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.
GamesMetadataClient
Stay organized with collections
Save and categorize content based on your preferences.
A client to receive GamesMetadata.
Public Methods
public abstract Task<Game>
getCurrentGame ()
Returns a Task
which
asynchronously loads the Game
metadata for the current game from the local cache.
The Task
returned will not be null, but the Game
returned
from the Task
may be null if the metadata is not available locally.
Returns a Task
which
asynchronously loads an annotated Game
metadata for the current game.
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."],[[["`GamesMetadataClient` provides methods to retrieve game metadata."],["`getCurrentGame()` fetches game metadata from the local cache asynchronously."],["`loadGame()` retrieves annotated game metadata asynchronously."],["The `Task` returned by these methods will never be null, but the `Game` data might be null if unavailable."]]],["The `GamesMetadataClient` interface provides methods to retrieve game metadata. `getCurrentGame()` asynchronously loads `Game` metadata from the local cache, potentially returning null if not available. `loadGame()` asynchronously fetches annotated `Game` metadata, returning a `Task` that provides the information. Both methods rely on `Task` objects to handle the asynchronous nature of loading data.\n"]]