public class

Places

extends Object
java.lang.Object
   ↳ com.google.android.gms.location.places.Places

Class Overview

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.

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
static GeoDataClient getGeoDataClient(Activity activity)
Returns an instance of GeoDataClient for use in an Activity.
static GeoDataClient getGeoDataClient(Activity activity, PlacesOptions options)
This method is deprecated. use getGeoDataClient(Activity) instead.
static GeoDataClient getGeoDataClient(Context context, PlacesOptions options)
This method is 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 is 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 is deprecated. use getPlaceDetectionClient(Activity) instead.
static PlaceDetectionClient getPlaceDetectionClient(Context context)
Returns an instance of PlaceDetectionClient for use in a non-activity Context.
[Expand]
Inherited Methods
From class java.lang.Object

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.

Parameters
activity Activity
Returns
GeoDataClient

public static GeoDataClient getGeoDataClient (Activity activity, PlacesOptions options)

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

Returns an instance of GeoDataClient for use in an Activity.

Parameters
activity Activity
options PlacesOptions
Returns
GeoDataClient

public static GeoDataClient getGeoDataClient (Context context, PlacesOptions options)

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

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

Parameters
context Context
options PlacesOptions
Returns
GeoDataClient

public static GeoDataClient getGeoDataClient (Context context)

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

Parameters
context Context
Returns
GeoDataClient

public static PlaceDetectionClient getPlaceDetectionClient (Context context, PlacesOptions options)

This method is deprecated.
use getPlaceDetectionClient(Context) instead

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

Parameters
context Context
options PlacesOptions
Returns
PlaceDetectionClient

public static PlaceDetectionClient getPlaceDetectionClient (Activity activity)

Returns an instance of PlaceDetectionClient for use in an Activity.

Parameters
activity Activity
Returns
PlaceDetectionClient

public static PlaceDetectionClient getPlaceDetectionClient (Activity activity, PlacesOptions options)

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

Returns an instance of PlaceDetectionClient for use in an Activity.

Parameters
activity Activity
options PlacesOptions
Returns
PlaceDetectionClient

public static PlaceDetectionClient getPlaceDetectionClient (Context context)

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

Parameters
context Context
Returns
PlaceDetectionClient