Identity
Stay organized with collections
Save and categorize content based on your preferences.
The entry point to the Sign-In APIs.
Inherited Method Summary
From class java.lang.Object
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-10-31 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-10-31 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eIdentity\u003c/code\u003e class serves as the entry point for utilizing Google Sign-In APIs on Android.\u003c/p\u003e\n"],["\u003cp\u003eIt provides static methods to obtain instances of \u003ccode\u003eAuthorizationClient\u003c/code\u003e, \u003ccode\u003eCredentialSavingClient\u003c/code\u003e, and \u003ccode\u003eSignInClient\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThese client objects facilitate various functionalities related to user authorization, credential management, and sign-in processes.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use \u003ccode\u003eIdentity\u003c/code\u003e to integrate Google Sign-In features seamlessly into their Android applications.\u003c/p\u003e\n"]]],["The `Identity` class serves as the main access point for Sign-In APIs. It offers static methods to retrieve new instances of three client types. `getAuthorizationClient` returns an `AuthorizationClient` instance, accepting either an `Activity` or `Context`. `getCredentialSavingClient` provides a `CredentialSavingClient` instance, also with `Activity` or `Context` options. Lastly, `getSignInClient` returns a `SignInClient` instance, available with an `Activity` or `Context` parameter.\n"],null,["# Identity\n\npublic final class **Identity** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nThe entry point to the Sign-In APIs. \n\n### Public Method Summary\n\n|---------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [AuthorizationClient](/android/reference/com/google/android/gms/auth/api/identity/AuthorizationClient) | [getAuthorizationClient](/android/reference/com/google/android/gms/auth/api/identity/Identity#getAuthorizationClient(android.content.Context))([Context](//developer.android.com/reference/android/content/Context.html) context) Returns a new instance of [AuthorizationClient](/android/reference/com/google/android/gms/auth/api/identity/AuthorizationClient). |\n| static [AuthorizationClient](/android/reference/com/google/android/gms/auth/api/identity/AuthorizationClient) | [getAuthorizationClient](/android/reference/com/google/android/gms/auth/api/identity/Identity#getAuthorizationClient(android.app.Activity))([Activity](//developer.android.com/reference/android/app/Activity.html) activity) Returns a new instance of [AuthorizationClient](/android/reference/com/google/android/gms/auth/api/identity/AuthorizationClient). |\n| static [CredentialSavingClient](/android/reference/com/google/android/gms/auth/api/identity/CredentialSavingClient) | [getCredentialSavingClient](/android/reference/com/google/android/gms/auth/api/identity/Identity#getCredentialSavingClient(android.app.Activity))([Activity](//developer.android.com/reference/android/app/Activity.html) activity) Returns a new instance of [CredentialSavingClient](/android/reference/com/google/android/gms/auth/api/identity/CredentialSavingClient). |\n| static [CredentialSavingClient](/android/reference/com/google/android/gms/auth/api/identity/CredentialSavingClient) | [getCredentialSavingClient](/android/reference/com/google/android/gms/auth/api/identity/Identity#getCredentialSavingClient(android.content.Context))([Context](//developer.android.com/reference/android/content/Context.html) context) Returns a new instance of [CredentialSavingClient](/android/reference/com/google/android/gms/auth/api/identity/CredentialSavingClient). |\n| static [SignInClient](/android/reference/com/google/android/gms/auth/api/identity/SignInClient) | [getSignInClient](/android/reference/com/google/android/gms/auth/api/identity/Identity#getSignInClient(android.app.Activity))([Activity](//developer.android.com/reference/android/app/Activity.html) activity) Returns a new instance of [SignInClient](/android/reference/com/google/android/gms/auth/api/identity/SignInClient). |\n| static [SignInClient](/android/reference/com/google/android/gms/auth/api/identity/SignInClient) | [getSignInClient](/android/reference/com/google/android/gms/auth/api/identity/Identity#getSignInClient(android.content.Context))([Context](//developer.android.com/reference/android/content/Context.html) context) Returns a new instance of [SignInClient](/android/reference/com/google/android/gms/auth/api/identity/SignInClient). |\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\nPublic Methods\n--------------\n\n#### public static [AuthorizationClient](/android/reference/com/google/android/gms/auth/api/identity/AuthorizationClient)\n**getAuthorizationClient** ([Context](//developer.android.com/reference/android/content/Context.html) context)\n\nReturns a new instance of [AuthorizationClient](/android/reference/com/google/android/gms/auth/api/identity/AuthorizationClient). \n\n#### public static [AuthorizationClient](/android/reference/com/google/android/gms/auth/api/identity/AuthorizationClient)\n**getAuthorizationClient** ([Activity](//developer.android.com/reference/android/app/Activity.html) activity)\n\nReturns a new instance of [AuthorizationClient](/android/reference/com/google/android/gms/auth/api/identity/AuthorizationClient). \n\n#### public static [CredentialSavingClient](/android/reference/com/google/android/gms/auth/api/identity/CredentialSavingClient)\n**getCredentialSavingClient** ([Activity](//developer.android.com/reference/android/app/Activity.html) activity)\n\nReturns a new instance of [CredentialSavingClient](/android/reference/com/google/android/gms/auth/api/identity/CredentialSavingClient). \n\n#### public static [CredentialSavingClient](/android/reference/com/google/android/gms/auth/api/identity/CredentialSavingClient)\n**getCredentialSavingClient** ([Context](//developer.android.com/reference/android/content/Context.html) context)\n\nReturns a new instance of [CredentialSavingClient](/android/reference/com/google/android/gms/auth/api/identity/CredentialSavingClient). \n\n#### public static [SignInClient](/android/reference/com/google/android/gms/auth/api/identity/SignInClient)\n**getSignInClient** ([Activity](//developer.android.com/reference/android/app/Activity.html) activity)\n\nReturns a new instance of [SignInClient](/android/reference/com/google/android/gms/auth/api/identity/SignInClient). \n\n#### public static [SignInClient](/android/reference/com/google/android/gms/auth/api/identity/SignInClient)\n**getSignInClient** ([Context](//developer.android.com/reference/android/content/Context.html) context)\n\nReturns a new instance of [SignInClient](/android/reference/com/google/android/gms/auth/api/identity/SignInClient)."]]