Android Google SignIn integration edit

Code Implementation Google SignIn

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
       .requestEmail()
       .build();
mGoogleApiClient = new GoogleApiClient.Builder(this)
       .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)
       .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
       .build();
private void signIn() {
Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);
startActivityForResult(signInIntent, RC_SIGN_IN);
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
   super.onActivityResult(requestCode, resultCode, data);

   // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);
   if (requestCode == RC_SIGN_IN) {
       GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
       handleSignInResult(result);
   }
}
private void handleSignInResult(GoogleSignInResult result) {
Log.d(TAG, "handleSignInResult:" + result.isSuccess());
if (result.isSuccess()) {
    // Signed in successfully, show authenticated UI.
    GoogleSignInAccount acct = result.getSignInAccount();
    mStatusTextView.setText(getString(R.string.signed_in_fmt, acct.getDisplayName()));
    updateUI(true);
} else {
    // Signed out, show unauthenticated UI.
    updateUI(false);
}
}

Table Of Contents
39 ACRA
64 Menu
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
217 Paint
231 AIDL
241 JCodec
243 Okio
244 Google SignIn integration
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close