I'm trying to get a user's profile using the new Google Sign In API introduced in play services 8.3. Other than Display Name, Email and Id, I also need user's gender.
Plus.PeopleApi.getCurrentPerson()
is deprecated as per play services 8.3 and also returns null for me even though
mGoogleApiClient.hasConnectedApi(Plus.API)
returns true.
GoogleSignInAccount.getGrantedScopes
returns
https://www.googleapis.com/auth/plus.me
https://www.googleapis.com/auth/plus.login
profile
email
openid
Google Developer Console doesn't show any hits on the Google+ API. I have placed the correct google-services.json file in app/ folder of application. I even generated the SHA1 fingerprint programatically to verify if I was using the correct keystore.
How can I get the person google+ profile data (gender, family name, given name etc.) using the new sign in API?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…