GoogleSignInOptions

class GoogleSignInOptions : Parcelable, Api.ApiOptions.Optional


GoogleSignInOptions contains options used to configure the GOOGLE_SIGN_IN_API.

Summary

Nested types

Builder for GoogleSignInOptions.

Constants

const Parcelable.Creator<GoogleSignInOptions!>!
const GoogleSignInOptions!

Default and recommended configuration for Games Sign In.

const GoogleSignInOptions!

Default configuration for Google Sign In.

Public functions

Boolean
equals(obj: Any?)
Array<Scope!>!

Gets an array of all the requested scopes.

Int
Unit
writeToParcel(out: Parcel!, flags: Int)

Inherited functions

From android.os.Parcelable
abstract Int

Constants

DEFAULT_GAMES_SIGN_IN

const val DEFAULT_GAMES_SIGN_INGoogleSignInOptions!

Default and recommended configuration for Games Sign In.

  • If your app has a server, you can build a configuration via new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN) and further configure requestServerAuthCode.
  • If you want to customize Games sign-in options, you can build a configuration via new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN) and further configure com.google.android.gms.games.Games.GamesOptions via addExtension.

To maximize chance of auto-sign-in, do NOT use requestScopes to request additional scopes and do NOT use requestIdToken to request user's real Google identity assertion.

DEFAULT_SIGN_IN

const val DEFAULT_SIGN_INGoogleSignInOptions!

Default configuration for Google Sign In. You can get a stable user ID and basic profile info back via getId after you trigger sign in from either silentSignIn or getSignInIntent. If you require more information for the sign in result, please build a configuration via new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)}.

Public functions

equals

fun equals(obj: Any?): Boolean

getScopeArray

fun getScopeArray(): Array<Scope!>!

Gets an array of all the requested scopes. If you use DEFAULT_SIGN_IN, this array will also include those scopes set by default in DEFAULT_SIGN_IN.

A usage of this method could be set the scopes for the contextual SignInButton. E.g., signInButton.setScopes(googleSignInOptions.getScopeArray())

hashCode

fun hashCode(): Int

writeToParcel

fun writeToParcel(out: Parcel!, flags: Int): Unit