您应该使用
interfacePerson,您将拥有所有需要了解的有关用户的信息。(通过
getGender()和
getBirthday()(或
getAgeRange())
编辑:例如,假设使用getGender(),您可以在此周围做一些事情:
GoogleApiClient client = new GoogleApiClient.Builder(this) .addApi(Plus.API) .addScope(Plus.SCOPE_PLUS_LOGIN) .setAccountName("users.account.name@gmail.com") .build();client.connect();Person.Gender gender;Person personProfile = Plus.PeopleApi.getCurrentPerson(client);if (person.hasGender()) // it's not guaranteed gender = person.getGender();


