How to get user's gender and date of birth by using googleapi client in android?

旧时模样 提交于 2019-11-29 10:27:18

问题


Hello all i am using google sign-in integration in my android app and everything is working fine but actually i also want to get user date of birth and his gender now does google provide this, if google provides this then what should i define in scopes inside my googleapiclient builder.My code for getting default-sign-in information is given below please tell me where should i use above two scopes to fetch them from api.

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
            .requestEmail()
            .build();
    mGoogleApiClient = new GoogleApiClient.Builder(this)
            .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)
            .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
            .build();

来源:https://stackoverflow.com/questions/33907891/how-to-get-users-gender-and-date-of-birth-by-using-googleapi-client-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!