我正在尝试使用播放服务8.3中引入的新Google登录API来获取用户的个人资料.除了显示名称,电子邮件和身份证,我还需要用户的性别.
Plus.PeopleApi.getCurrentPerson()
Run Code Online (Sandbox Code Playgroud)
根据播放服务8.3不推荐使用,即使我也为null返回null
mGoogleApiClient.hasConnectedApi(Plus.API)
Run Code Online (Sandbox Code Playgroud)
返回true.
GoogleSignInAccount.getGrantedScopes
Run Code Online (Sandbox Code Playgroud)
回报
https://www.googleapis.com/auth/plus.me
https://www.googleapis.com/auth/plus.login
profile
email
openid
Run Code Online (Sandbox Code Playgroud)
Google Developer Console未在Google+ API上显示任何匹配.我已将正确的google-services.json文件放在应用程序的app /文件夹中.我甚至以编程方式生成SHA1指纹以验证我是否使用了正确的密钥库.
如何使用新登录API获取此人的Google +个人资料数据(性别,姓氏,姓名等)?
android google-api-client google-play-services google-plus-signin google-signin
android ×1