GamesMetadataClient
Stay organized with collections
Save and categorize content based on your preferences.
This interface is deprecated.
Consider migrating to the games v2. Refer to the migration
guide
.
A client to receive GamesMetadata.
Public Methods
public abstract Task< Game
>
getCurrentGame
()
This method is deprecated.
Consider migrating to the games v2. Refer to the migration
guide
.
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.
public abstract Task< AnnotatedData
< Game
>>
loadGame
()
This method is deprecated.
Consider migrating to the games v2. Refer to the migration
guide
.
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-06-23 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-06-23 UTC."],[[["\u003cp\u003e\u003ccode\u003eGamesMetadataClient\u003c/code\u003e provides methods to access game metadata.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003egetCurrentGame()\u003c/code\u003e fetches the current game's metadata from the local cache asynchronously.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eloadGame()\u003c/code\u003e loads annotated metadata for the current game asynchronously.\u003c/p\u003e\n"]]],["The `GamesMetadataClient` interface provides methods to retrieve game metadata. `getCurrentGame()` asynchronously loads the current game's metadata from the local cache, returning a Task that may contain a null Game if unavailable. `loadGame()` asynchronously loads annotated metadata for the current game, returning a Task with the relevant data. Both methods utilize Tasks to manage the asynchronous loading of Game data.\n"],null,["# GamesMetadataClient\n\npublic interface **GamesMetadataClient** \n**This interface is deprecated.** \n\nConsider migrating to the games v2. Refer to the [migration\nguide](//developer.android.com/games/pgs/android/migrate-to-v2#migrate-signin-client).\n\nA client to receive GamesMetadata. \n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract Task\\\u003c[Game](/android/reference/com/google/android/gms/games/Game)\\\u003e | [getCurrentGame](/android/reference/com/google/android/gms/games/GamesMetadataClient#getCurrentGame())() *This method is deprecated. Consider migrating to the games v2. Refer to the [migration guide](//developer.android.com/games/pgs/android/migrate-to-v2#migrate-signin-client).* |\n| abstract Task\\\u003c[AnnotatedData](/android/reference/com/google/android/gms/games/AnnotatedData)\\\u003c[Game](/android/reference/com/google/android/gms/games/Game)\\\u003e\\\u003e | [loadGame](/android/reference/com/google/android/gms/games/GamesMetadataClient#loadGame())() *This method is deprecated. Consider migrating to the games v2. Refer to the [migration guide](//developer.android.com/games/pgs/android/migrate-to-v2#migrate-signin-client).* |\n\nPublic Methods\n--------------\n\n#### public abstract Task\\\u003c[Game](/android/reference/com/google/android/gms/games/Game)\\\u003e\n**getCurrentGame** ()\n\n**This method is deprecated.** \n\nConsider migrating to the games v2. Refer to the [migration\nguide](//developer.android.com/games/pgs/android/migrate-to-v2#migrate-signin-client). \nReturns a [Task](/android/reference/com/google/android/gms/tasks/Task) which\nasynchronously loads the [Game](/android/reference/com/google/android/gms/games/Game) metadata\nfor the current game from the local cache.\n\nThe `Task` returned will not be null, but the `Game` returned\nfrom the `Task` may be null if the metadata is not available locally. \n\n#### public abstract Task\\\u003c[AnnotatedData](/android/reference/com/google/android/gms/games/AnnotatedData)\\\u003c[Game](/android/reference/com/google/android/gms/games/Game)\\\u003e\\\u003e\n**loadGame** ()\n\n**This method is deprecated.** \n\nConsider migrating to the games v2. Refer to the [migration\nguide](//developer.android.com/games/pgs/android/migrate-to-v2#migrate-signin-client). \nReturns a [Task](/android/reference/com/google/android/gms/tasks/Task) which\nasynchronously loads an annotated [Game](/android/reference/com/google/android/gms/games/Game) metadata\nfor the current game."]]