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.
Events
Stay organized with collections
Save and categorize content based on your preferences.
This interface is deprecated.
Use EventsClient
instead
Entry point for events functionality.
Public Methods
public abstract void
increment
( GoogleApiClient
apiClient, String
eventId, int incrementAmount)
Increments an event by the given number of steps.
This is the fire-and-forget API. Event increments are cached locally and flushed to
the server in batches.
Required API: Games.API
Required Scopes: Games.SCOPE_GAMES
Parameters
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."],[[["\u003cp\u003eThe \u003ccode\u003eEvents\u003c/code\u003e interface is deprecated and developers should use \u003ccode\u003eEventsClient\u003c/code\u003e instead.\u003c/p\u003e\n"],["\u003cp\u003eIt provided an entry point for events functionality, allowing developers to increment events and load event data.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eincrement\u003c/code\u003e method allowed incrementing an event by a given number of steps.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eload\u003c/code\u003e and \u003ccode\u003eloadByIds\u003c/code\u003e methods allowed loading event data for the current player or for specified event IDs.\u003c/p\u003e\n"]]],["The `Events` interface, now deprecated in favor of `EventsClient`, manages game events. Key actions include incrementing an event's progress via `increment` by a specified amount. `load` retrieves event data for the signed-in player, while `loadByIds` fetches data for specific event IDs. Both loading methods offer `forceReload` to bypass cached data. All methods require `GoogleApiClient`, `Games.API`, and `Games.SCOPE_GAMES`. The increment method caches events locally and later flushes them.\n"],null,["# Events\n\npublic interface **Events** \n**This interface is deprecated.** \n\nUse [EventsClient](/android/games_v1/reference/com/google/android/gms/games/EventsClient)\ninstead\n\nEntry point for events functionality. \n\n### Nested Class Summary\n\n|-----------|---|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| interface | [Events.LoadEventsResult](/android/games_v1/reference/com/google/android/gms/games/event/Events.LoadEventsResult) || *This interface is deprecated. [EventBuffer](/android/games_v1/reference/com/google/android/gms/games/event/EventBuffer) is returned directly in the [EventsClient](/android/games_v1/reference/com/google/android/gms/games/EventsClient).* |\n\n### Public Method Summary\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract void | [increment](/android/games_v1/reference/com/google/android/gms/games/event/Events#increment(com.google.android.gms.common.api.GoogleApiClient,%20java.lang.String,%20int))([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) apiClient, [String](//developer.android.com/reference/java/lang/String.html) eventId, int incrementAmount) Increments an event by the given number of steps. |\n| abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[Events.LoadEventsResult](/android/games_v1/reference/com/google/android/gms/games/event/Events.LoadEventsResult)\\\u003e | [load](/android/games_v1/reference/com/google/android/gms/games/event/Events#load(com.google.android.gms.common.api.GoogleApiClient,%20boolean))([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) apiClient, boolean forceReload) Asynchronously load event data for the currently signed in player. |\n| abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[Events.LoadEventsResult](/android/games_v1/reference/com/google/android/gms/games/event/Events.LoadEventsResult)\\\u003e | [loadByIds](/android/games_v1/reference/com/google/android/gms/games/event/Events#loadByIds(com.google.android.gms.common.api.GoogleApiClient,%20boolean,%20java.lang.String...))([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) apiClient, boolean forceReload, [String...](//developer.android.com/reference/java/lang/String.html) eventIds) Asynchronously load event data for specified event IDs. |\n\nPublic Methods\n--------------\n\n#### public abstract void **increment** ([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) apiClient, [String](//developer.android.com/reference/java/lang/String.html) eventId, int incrementAmount)\n\nIncrements an event by the given number of steps.\n\nThis is the fire-and-forget API. Event increments are cached locally and flushed to\nthe server in batches.\n\nRequired API: [Games.API](/android/games_v1/reference/com/google/android/gms/games/Games#API) \n\n\nRequired Scopes: [Games.SCOPE_GAMES](/android/games_v1/reference/com/google/android/gms/games/Games#SCOPE_GAMES) \n\n##### Parameters\n\n| apiClient | The [GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) to service the call. |\n| eventId | The event ID to increment. |\n| incrementAmount | The amount increment by. Must be greater than or equal to 0. |\n|-----------------|------------------------------------------------------------------------------------------------------------------|\n\n#### public abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[Events.LoadEventsResult](/android/games_v1/reference/com/google/android/gms/games/event/Events.LoadEventsResult)\\\u003e\n**load** ([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) apiClient, boolean forceReload)\n\nAsynchronously load event data for the currently signed in player.\n\nRequired API: [Games.API](/android/games_v1/reference/com/google/android/gms/games/Games#API) \n\n\nRequired Scopes: [Games.SCOPE_GAMES](/android/games_v1/reference/com/google/android/gms/games/Games#SCOPE_GAMES) \n\n##### Parameters\n\n| apiClient | The [GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) to service the call. |\n| 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. |\n|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult) to access the data when available. \n\n#### public abstract [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult)\\\u003c[Events.LoadEventsResult](/android/games_v1/reference/com/google/android/gms/games/event/Events.LoadEventsResult)\\\u003e\n**loadByIds** ([GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) apiClient, boolean forceReload, [String...](//developer.android.com/reference/java/lang/String.html) eventIds)\n\nAsynchronously load event data for specified event IDs.\n\nRequired API: [Games.API](/android/games_v1/reference/com/google/android/gms/games/Games#API) \n\n\nRequired Scopes: [Games.SCOPE_GAMES](/android/games_v1/reference/com/google/android/gms/games/Games#SCOPE_GAMES) \n\n##### Parameters\n\n| apiClient | The [GoogleApiClient](/android/reference/com/google/android/gms/common/api/GoogleApiClient) to service the call. |\n| 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. |\n| eventIds | The IDs of the events to load. |\n|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- [PendingResult](/android/reference/com/google/android/gms/common/api/PendingResult) to access the data when available."]]