People | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Tools & Reference
  - Developer Stories

## Results

Loading...
public interface

# People

com.google.android.gms.plus.People

## Class Overview

Methods and interfaces related to people in Google+.

## Summary

Nested Classes
interface | People.LoadPeopleResult | Information about the set of people that was loaded.
interface | People.OrderBy | Constants to declare the order to return people in.

Public Methods
abstract Person | getCurrentPerson(GoogleApiClient googleApiClient) Returns profile information for the current user.
abstract PendingResult<People.LoadPeopleResult> | load(GoogleApiClient googleApiClient, String... personIds) Loads a list of specified people.
abstract PendingResult<People.LoadPeopleResult> | load(GoogleApiClient googleApiClient, Collection<String> personIds) Loads a list of specified people.
abstract PendingResult<People.LoadPeopleResult> | loadConnected(GoogleApiClient googleApiClient) Loads a list of visible people in the authenticated user’s circles that are signed into the same app with Google+.
abstract PendingResult<People.LoadPeopleResult> | loadVisible(GoogleApiClient googleApiClient, String pageToken) Loads the list of visible people in the user's circles.
abstract PendingResult<People.LoadPeopleResult> | loadVisible(GoogleApiClient googleApiClient, int orderBy, String pageToken) Loads the list of visible people in the user's circles.

## Public Methods

#### public abstract Person getCurrentPerson (GoogleApiClient googleApiClient)

Returns profile information for the current user. For more information, see: https://developers.google.com/+/api/latest/people/get.

This method can return `null` if the required scopes weren't specified in the `GoogleApiClient.Builder`, or if there was a network error while connecting.

Required API: `API`
Required Scopes: `SCOPE_PLUS_LOGIN` or `SCOPE_PLUS_PROFILE`

##### Parameters

googleApiClient | The `GoogleApiClient` to service the call.

##### Returns

- Profile information for the current user, if available, or `null` otherwise.

#### public abstract PendingResult<People.LoadPeopleResult> load (GoogleApiClient googleApiClient, String... personIds)

Loads a list of specified people.

This call returns all information in `Person`, but only for the people specified and for data that is public in their profiles.

Required API: `API`
Required Scopes: `SCOPE_PLUS_LOGIN`

##### Parameters

googleApiClient | The `GoogleApiClient` to service the call.
personIds | The ids of people to load. This should match the user id that would be sent to https://developers.google.com/+/api/latest/people/get

##### Returns

- the PendingResult for notification and access to the result when it's available.

#### public abstract PendingResult<People.LoadPeopleResult> load (GoogleApiClient googleApiClient, Collection<String> personIds)

Loads a list of specified people.

This call returns all information in `Person`, but only for the people specified and for data that is public in their profiles.

Required API: `API`
Required Scopes: `SCOPE_PLUS_LOGIN`

##### Parameters

googleApiClient | The `GoogleApiClient` to service the call.
personIds | The IDs of people to load. This should match the user id that would be sent to https://developers.google.com/+/api/latest/people/get

##### Returns

- the PendingResult for notification and access to the result when it's available.

#### public abstract PendingResult<People.LoadPeopleResult> loadConnected (GoogleApiClient googleApiClient)

Loads a list of visible people in the authenticated user’s circles that are signed into the same app with Google+. For more information, see: https://developers.google.com/+/api/latest/people/list.

Each `Person` will contain the `id`, `displayName`, `image`, `objectType`, and `url` fields populated. To retrieve additional profile data, use the `load(GoogleApiClient, String...)` method.

Required API: `API`
Required Scopes: `SCOPE_PLUS_LOGIN`

##### Parameters

googleApiClient | The `GoogleApiClient` to service the call.

#### public abstract PendingResult<People.LoadPeopleResult> loadVisible (GoogleApiClient googleApiClient, String pageToken)

Loads the list of visible people in the user's circles. For more information, see: https://developers.google.com/+/api/latest/people/list.

Each `Person` will contain the `id`, `displayName`, `image`, `objectType`, and `url` fields populated. To retrieve additional profile data, use the `load(GoogleApiClient, String...)` method.

Required API: `API`
Required Scopes: `SCOPE_PLUS_LOGIN`

##### Parameters

googleApiClient | The `GoogleApiClient` to service the call.
pageToken | Result of `getNextPageToken()` to get the next page of data. Pass in `null` to get the first page.

##### Returns

- the PendingResult for notification and access to the result when it's available.

#### public abstract PendingResult<People.LoadPeopleResult> loadVisible (GoogleApiClient googleApiClient, int orderBy, String pageToken)

Loads the list of visible people in the user's circles. For more information, see: https://developers.google.com/+/api/latest/people/list.

Each `Person` will contain the `id`, `displayName`, `image`, `objectType`, and `url` fields populated. To retrieve additional profile data, use the `load(GoogleApiClient, String...)` method.

Required API: `API`
Required Scopes: `SCOPE_PLUS_LOGIN`

##### Parameters

googleApiClient | The `GoogleApiClient` to service the call.
orderBy | The order to return people in. Valid values are: `ALPHABETICAL` - Order the people by their display name. `BEST` - Order people based on the relevance to the viewer.
pageToken | Result of `getNextPageToken()` to get the next page of data. Pass in `null` to get the first page.

##### Returns

- the PendingResult for notification and access to the result when it's available.