-1

I have created Google sign in button to get access through the Google account into my app.

I have no thought about how to retrieve the information of Google account and store it into my sqlitedB of the app.

So can any one have a suggestion please let me know.

Thanks for the tip.

Amit Vaghela
  • 21,317
  • 19
  • 79
  • 131
user2675040
  • 79
  • 2
  • 7

1 Answers1

0

Use the GoogleSignInResult.getSignInAccount method to request profile information for the currently signed in user.

 GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
 GoogleSignInAccount acct = result.getSignInAccount();
 String personName = acct.getDisplayName();
 String personEmail = acct.getEmail();
 String personId = acct.getId();
 Uri personPhoto = acct.getPhotoUrl();

more details refer Retrieve profile information for a signed-in user

sasikumar
  • 10,919
  • 2
  • 21
  • 42