PlayGamesSdk
Stay organized with collections
Save and categorize content based on your preferences.
Entry point for the Play Games SDK.
Public Method Summary
static void
initialize
( Context
context) Initializes the Play Games SDK using the Game services application id defined
in the application's manifest.
Inherited Method Summary
From class java.lang.Object
Constants
public static final int
MIN_ANDROID_API_VERSION
Public Methods
public static void
initialize
( Context
context)
Initializes the Play Games SDK using the Game services application id defined in the
application's manifest.
It is only necessary to call this method if you disable the PlayGamesInitProvider
provider declared by the Play Games SDK. Under
normal circumstances PlayGamesInitProvider
will automatically initialize
the Play Games SDK at application startup.
Parameters
context
a Context
used to initialize the Play Games SDK.
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 2024-12-09 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 2024-12-09 UTC."],[[["\u003cp\u003e\u003ccode\u003ePlayGamesSdk\u003c/code\u003e is the entry point for integrating the Play Games SDK into your Android application.\u003c/p\u003e\n"],["\u003cp\u003eIt provides a method, \u003ccode\u003einitialize\u003c/code\u003e, to manually initialize the SDK if automatic initialization is disabled.\u003c/p\u003e\n"],["\u003cp\u003eInitialization usually happens automatically at app startup through the \u003ccode\u003ePlayGamesInitProvider\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eTo use the Play Games SDK, your app needs a Game services application ID defined in its manifest.\u003c/p\u003e\n"]]],["The `PlayGamesSdk` class serves as the entry point for the Play Games SDK. Key actions include using `initialize(Context context)` to start the SDK, which uses the Game services application ID from the manifest. This is usually handled automatically by `PlayGamesInitProvider`. The minimum supported Android API version is 19, defined by `MIN_ANDROID_API_VERSION`. Inherited methods from the Object class include methods such as `clone`, `equals`, and `toString`, among others.\n"],null,["# PlayGamesSdk\n\npublic final class **PlayGamesSdk** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nEntry point for the Play Games SDK. \n\n### Constant Summary\n\n|-----|-----------------------------------------------------------------------------------------------------------------|---|\n| int | [MIN_ANDROID_API_VERSION](/android/reference/com/google/android/gms/games/PlayGamesSdk#MIN_ANDROID_API_VERSION) | |\n\n### Public Method Summary\n\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static void | [initialize](/android/reference/com/google/android/gms/games/PlayGamesSdk#initialize(android.content.Context))([Context](//developer.android.com/reference/android/content/Context.html) context) Initializes the Play Games SDK using the Game services application id defined in the application's manifest. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nConstants\n---------\n\n#### public static final int\n**MIN_ANDROID_API_VERSION**\n\nConstant Value: 19\n\nPublic Methods\n--------------\n\n#### public static void **initialize** ([Context](//developer.android.com/reference/android/content/Context.html) context)\n\nInitializes the Play Games SDK using the Game services application id defined in the\napplication's manifest.\n\nIt is only necessary to call this method if you disable the\n`PlayGamesInitProvider` provider declared by the Play Games SDK. Under\nnormal circumstances `PlayGamesInitProvider` will automatically initialize\nthe Play Games SDK at application startup. \n\n##### Parameters\n\n| context | a [Context](//developer.android.com/reference/android/content/Context.html) used to initialize the Play Games SDK. |\n|---------|--------------------------------------------------------------------------------------------------------------------|"]]