Skip to content

Instantly share code, notes, and snippets.

@bkhezry
Created December 29, 2018 16:07
Show Gist options
  • Save bkhezry/497c926fd517ad625d8a5103437d4042 to your computer and use it in GitHub Desktop.
Save bkhezry/497c926fd517ad625d8a5103437d4042 to your computer and use it in GitHub Desktop.
private void setUpGoogleSignIn() {
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(getString(R.string.default_web_client_id))
.requestEmail()
.build();
mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
.build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment