Places

public class Places extends Object

The main entry point for apps to integrate with the Google Places API for Android. The Places API consists of the GeoDataApi, the PlaceDetectionApi and the place picker widget.

The GeoDataApi contains methods that provide access to Google's database of local place and business information.

The PlaceDetectionApi contains methods that provide access to information about the device's current location.

For information on the place picker, see PlacePicker and the corresponding developer's guide.

For more information on how to use the API, including getting started guides and code samples, see the developer's guide.

Field Summary

public static final Api<PlacesOptions> GEO_DATA_API Token to pass to addApi(Api ) to enable use of the GeoDataApi features.
public static final GeoDataApi GeoDataApi Methods offered by the GeoDataApi.
public static final Api<PlacesOptions> PLACE_DETECTION_API Token to pass to addApi(Api ) to enable use of the PlaceDetectionApi features.
public static final PlaceDetectionApi PlaceDetectionApi Methods offered by the PlaceDetectionApi.

Public Method Summary

static GeoDataClient
getGeoDataClient(Activity activity)
Returns an instance of GeoDataClient for use in an Activity.
static GeoDataClient
getGeoDataClient(Activity activity, PlacesOptions options)
This method was deprecated. use getGeoDataClient(Activity) instead.
static GeoDataClient
getGeoDataClient(Context context, PlacesOptions options)
This method was deprecated. use getGeoDataClient(Context) instead.
static GeoDataClient
getGeoDataClient(Context context)
Returns an instance of GeoDataClient for use in a non-activity Context.
static PlaceDetectionClient
getPlaceDetectionClient(Context context, PlacesOptions options)
This method was deprecated. use getPlaceDetectionClient(Context) instead
static PlaceDetectionClient
getPlaceDetectionClient(Activity activity)
Returns an instance of PlaceDetectionClient for use in an Activity.
static PlaceDetectionClient
getPlaceDetectionClient(Activity activity, PlacesOptions options)
This method was deprecated. use getPlaceDetectionClient(Activity) instead.
static PlaceDetectionClient
getPlaceDetectionClient(Context context)
Returns an instance of PlaceDetectionClient for use in a non-activity Context.

Inherited Method Summary

Fields

public static final Api<PlacesOptions> GEO_DATA_API

Token to pass to addApi(Api ) to enable use of the GeoDataApi features.

public static final GeoDataApi GeoDataApi

Methods offered by the GeoDataApi.

public static final Api<PlacesOptions> PLACE_DETECTION_API

Token to pass to addApi(Api ) to enable use of the PlaceDetectionApi features.

public static final PlaceDetectionApi PlaceDetectionApi

Methods offered by the PlaceDetectionApi.

Public Methods

public static GeoDataClient getGeoDataClient (Activity activity)

Returns an instance of GeoDataClient for use in an Activity.

public static GeoDataClient getGeoDataClient (Activity activity, PlacesOptions options)

This method was deprecated.
use getGeoDataClient(Activity) instead.

Returns an instance of GeoDataClient for use in an Activity.

public static GeoDataClient getGeoDataClient (Context context, PlacesOptions options)

This method was deprecated.
use getGeoDataClient(Context) instead.

Returns an instance of GeoDataClient for use in a non-activity Context.

public static GeoDataClient getGeoDataClient (Context context)

Returns an instance of GeoDataClient for use in a non-activity Context.

public static PlaceDetectionClient getPlaceDetectionClient (Context context, PlacesOptions options)

This method was deprecated.
use getPlaceDetectionClient(Context) instead

Returns an instance of PlaceDetectionClient for use in a non-activity Context.

public static PlaceDetectionClient getPlaceDetectionClient (Activity activity)

Returns an instance of PlaceDetectionClient for use in an Activity.

public static PlaceDetectionClient getPlaceDetectionClient (Activity activity, PlacesOptions options)

This method was deprecated.
use getPlaceDetectionClient(Activity) instead.

Returns an instance of PlaceDetectionClient for use in an Activity.

public static PlaceDetectionClient getPlaceDetectionClient (Context context)

Returns an instance of PlaceDetectionClient for use in a non-activity Context.