Untitled diff
36 lines
private void handleSignInResult(GoogleSignInResult result) {
private void handleSignInResult(GoogleSignInResult result) {
Log.d(TAG, "handleSignInResult:" + result.isSuccess());
Log.d(TAG, "handleSignInResult:" + result.isSuccess());
if (result.isSuccess()) {
if (result.isSuccess()) {
// Signed in successfully, show authenticated UI.
// Signed in successfully, show authenticated UI.
GoogleSignInAccount acct = result.getSignInAccount();
GoogleSignInAccount acct = result.getSignInAccount();
Log.e(TAG, "display name: " + acct.getDisplayName());
Log.e(TAG, "display name: " + acct);
String personName = acct.getDisplayName();
personName = acct.getDisplayName();
String personPhotoUrl = null;
personPhotoUrl = String.valueOf(acct.getPhotoUrl());
try{
ggoleemail = acct.getEmail();
personPhotoUrl = acct.getPhotoUrl().toString();
googleid="G"+acct.getId();
String baday= String.valueOf(acct.getAccount());
}catch (Exception p){
}
String email = acct.getEmail();
Log.e(TAG, "Name: " + personName + ", email: " + email
Log.e(TAG, "Name: " + personName+googleid +baday+ ", email: " + ggoleemail
+ ", Image: " + personPhotoUrl);
+ ", Image: " + personPhotoUrl);
txtName.setText(personName);
txtName.setText(personName);
txtEmail.setText(email);
txtEmail.setText(email);
Glide.with(getApplicationContext()).load(personPhotoUrl)
Glide.with(getActivity()).load(personPhotoUrl)
.thumbnail(0.5f)
.thumbnail(0.5f)
.crossFade()
.crossFade()
.diskCacheStrategy(DiskCacheStrategy.ALL)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.into(imgProfilePic);
.into(imgProfilePic);
googleslogins();
updateUI(true);
updateUI(true);
} else {
} else {
// Signed out, show unauthenticated UI.
// Signed out, show unauthenticated UI.
updateUI(false);
updateUI(false);
}
}
}
}