google-plus-signin

Get person details in new google sign in Play Services 8.3

和自甴很熟 提交于 2019-11-26 11:23:49
问题 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

How to get profile like gender from google signin in Android?

倾然丶 夕夏残阳落幕 提交于 2019-11-26 06:36:52
问题 I want to integrate google sign in to my app, when user first sign in I will create an account bind to this, so I need some profiles like gender, locale, etc. and I tried as the google-sign-in doc and quick-start sample shows: GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestEmail() .build(); mGoogleApiClient = new GoogleApiClient.Builder(this) .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */) .addApi