> Documentation index: https://developers.google.com/maps/documentation/llms.txt

Places SDK for Android lets Android apps access Google's database of place and business information through Place Autocomplete, Place Details, Nearby Search, Text Search, and Place Photos. Places SDK for Android (New) is the current version and depends on Places API (New).

## Places SDK for Android: key facts

- **Product:** Places SDK for Android
- **Also known as:** Places SDK for Android (New)
- **Category:** Places
- **Platform:** Android
- **Runs on:** Client (app or browser code)
- **Launch stage:** GA
- **Lifecycle:** Active
- **Overview:** [Places SDK for Android overview](https://developers.google.com/maps/documentation/places/android-sdk/overview.md.txt)

## Places SDK for Android: when to use it

**Use Places SDK for Android when:**

- You need place details, photos, Nearby Search, or Text Search results inside a native Android app.
- You need a ready-made autocomplete widget or Places UI Kit components that return place predictions as users type in an Android app.
- You need prebuilt Places UI Kit fragments or Jetpack Compose composables (`AdvancedPlaceDetails`, `AdvancedPlaceDetailsCompact`) to display place details.
- You need to build location-aware Android features based on businesses and points of interest near the user's device.
**Don't use Places SDK for Android when:**

- You need to call Places from a server or backend over HTTP instead of from an Android app. Use [Places API (New)](https://developers.google.com/maps/documentation/places/web-service/quick-reference.md.txt) instead.
- You're building a native iOS app. Use [Places SDK for iOS](https://developers.google.com/maps/documentation/places/ios-sdk/quick-reference.md.txt) instead.
- You're building a web page in the browser. Use [Maps JavaScript API](https://developers.google.com/maps/documentation/javascript/quick-reference.md.txt) instead.

## Places SDK for Android: setup

- **Service to enable:** `places.googleapis.com`
- **Authentication:** API key
- **Usage attribution:** Call `Places.addInternalUsageAttributionId(String)` when initializing the SDK to send a usage attribution ID; delete the call or pass an empty string to opt out.
- **Get started:** [Set up Places SDK for Android](https://developers.google.com/maps/documentation/places/android-sdk/get-api-key.md.txt)
- **Reference:** [Places SDK for Android reference](https://developers.google.com/maps/documentation/places/android-sdk/reference.md.txt)
- **Pricing:** [Places SDK for Android usage and billing](https://developers.google.com/maps/documentation/places/android-sdk/usage-and-billing.md.txt)
- **Policies:** [Places SDK for Android policies](https://developers.google.com/maps/documentation/places/android-sdk/policies.md.txt)
- **Release notes:** [Places SDK for Android release notes](https://developers.google.com/maps/documentation/places/android-sdk/release-notes.md.txt)

**Official Places SDK for Android packages:**

- maven: `com.google.android.libraries.places:places`

## Places SDK for Android: related products

- **Often used with:** [Maps SDK for Android](https://developers.google.com/maps/documentation/android-sdk/quick-reference.md.txt), [Maps Experience agent tools](https://developers.google.com/maps/ai/maps-experience-agent-tools/quick-reference.md.txt)

## Places SDK for Android: common mistakes

- **Problem:** Nearby Search requests without a field list (field mask), or with an empty one, return an error. **Fix:** Pass at least one `Place.Field` in the `SearchNearbyRequest` field list. See [/maps/documentation/places/android-sdk/nearby-search](https://developers.google.com/maps/documentation/places/android-sdk/nearby-search.md.txt).
- **Problem:** Place Details (New), Nearby Search (New), and Autocomplete (New) fail when the API key lacks Places API (New), or on SDK 5.x and earlier when the app calls `Places.initialize()`. Version 6.0.2 removed `Places.initialize()`, so code calling it doesn't compile after upgrading. **Fix:** Enable Places API (New), add it to the API key's allowed APIs, and initialize with `Places.initializeWithNewPlacesApiEnabled()`. See [/maps/documentation/places/android-sdk/legacy/migrate-overview](https://developers.google.com/maps/documentation/places/android-sdk/legacy/migrate-overview.md.txt).
- **Problem:** The `Place` returned by `fetchPlace()` has no `PhotoMetadata` (so there's nothing to resolve) when the field list omits `PHOTO_METADATAS`. **Fix:** Include `Place.Field.PHOTO_METADATAS` in the field list. Because `fetchResolvedPhotoUri()` is deprecated, use the Places UI Kit Place Details component to display photos. See [/maps/documentation/places/android-sdk/place-photos](https://developers.google.com/maps/documentation/places/android-sdk/place-photos.md.txt).
- **Problem:** Apps that show place details, photos, or reviews without the returned third-party and author attributions violate the policies. **Fix:** Display the attributions returned with `Place`, `PhotoMetadata`, and `Review` objects. See [/maps/documentation/places/android-sdk/policies](https://developers.google.com/maps/documentation/places/android-sdk/policies.md.txt).
- **Problem:** Nested `ProvidePlacesAnalyticsHandler` blocks override outer handlers for components inside the inner block, and non-Compose Places UI Kit views do not emit events to `ProvidePlacesAnalyticsHandler` or support card-level `onClick`. **Fix:** Use `ProvidePlacesAnalyticsHandler` and card-level `onClick` with the `AdvancedPlaceDetails` and `AdvancedPlaceDetailsCompact` composables, and keep in mind that inner handlers override outer ones. See [/maps/documentation/places/android-sdk/places-ui-kit-analytics](https://developers.google.com/maps/documentation/places/android-sdk/places-ui-kit-analytics.md.txt).
- **Problem:** Custom content slots (`basicSectionTop` and `basicSectionBottom` in the `slots` lambda) are not supported in the full `AdvancedPlaceDetails` composable or Fragment views, and hiding the place name isn't supported in Fragment views (`AdvancedPlaceDetailsFragment`, `AdvancedPlaceDetailsCompactFragment`). **Fix:** Use the `AdvancedPlaceDetailsCompact` composable for custom content slots, and use the `AdvancedPlaceDetails` or `AdvancedPlaceDetailsCompact` composable (omitting `NAME` from `content`) to hide the place name. See [/maps/documentation/places/android-sdk/advanced-place-details-ui-kit](https://developers.google.com/maps/documentation/places/android-sdk/advanced-place-details-ui-kit.md.txt).
- **Problem:** Places UI Kit requests with an invalid, expired (\>10 minutes), or cross-project `contentTokens` set, or an `AdvancedPlaceListFragment` with any uncovered place, load normally and bill at standard rates without returning an error, and the SDK doesn't persist tokens across requests or accept them on `PlaceReference.Coordinates`. **Fix:** On Places SDK for Android 6.1.0+, pass `contentTokens` (up to 100 tokens, 2,048 UTF-8 bytes each) from the same Cloud project on each `PlaceReference.PlaceId`/`PlaceReference.ResourceName`, `loadWithPlaceId`/`loadWithResourceName`, or `configureFromPlaceIds`/`configureFromResourceNames` call within 10 minutes. See [/maps/ai/agentic-data-visualization-token](https://developers.google.com/maps/ai/agentic-data-visualization-token.md.txt).

## Places SDK for Android: legacy and deprecated features

- **Places SDK for Android (Legacy) / Places API (Legacy) features (Autocomplete, Current Place, Place Details, Place Photos legacy):** Legacy since 2025-03-01. **Replacement:** Places SDK for Android (New) features backed by Places API (New), initialized with `Places.initializeWithNewPlacesApiEnabled()`. **Symptom:** As of October 2026, new Cloud projects can't enable Places API (Legacy) (existing projects remain supported). SDK 6.0.2 removed the legacy methods, which exist only in 5.x and earlier. See the [migration guide](https://developers.google.com/maps/documentation/places/android-sdk/legacy/migrate-overview.md.txt).
- **`Places.initialize()`:** Decommissioned since 2026-09-30. **Replacement:** `Places.initializeWithNewPlacesApiEnabled()`. **Symptom:** Method removed from the SDK in 6.0.2; code that calls it no longer compiles. See the [migration guide](https://developers.google.com/maps/documentation/places/android-sdk/legacy/migrate-overview.md.txt).
- **`PlacesClient.findCurrentPlace()` and `awaitFindCurrentPlace()` (Current Place, legacy):** Decommissioned since 2026-09-30. **Replacement:** `PlacesClient.searchNearby()` (Nearby Search (New)). **Symptom:** Methods and `FindCurrentPlaceRequest`/`FindCurrentPlaceResponse` classes removed in 6.0.2. See the [migration guide](https://developers.google.com/maps/documentation/places/android-sdk/legacy/migrate-current-place.md.txt).
- **`PlacesClient.fetchPhoto()` and `awaitFetchPhoto()`:** Decommissioned since 2026-09-30. **Replacement:** Places UI Kit Place Details component (`PlacesClient.fetchResolvedPhotoUri()` is deprecated). **Symptom:** Methods and `FetchPhotoRequest`/`FetchPhotoResponse` classes removed in 6.0.2. See the [migration guide](https://developers.google.com/maps/documentation/places/android-sdk/legacy/migrate-photo.md.txt).
- **Places API (Legacy) autocomplete widget (`Autocomplete`, `AutocompleteSupportFragment`, `AutocompleteActivityMode`):** Decommissioned since 2026-09-30. **Replacement:** Place Autocomplete (New) widget (`PlaceAutocomplete`) or `PlacesClient.findAutocompletePredictions()`. **Symptom:** Classes removed from the SDK in 6.0.2. See the [migration guide](https://developers.google.com/maps/documentation/places/android-sdk/legacy/migrate-autocomplete.md.txt).
- **Places compatibility library (`com.google.android.libraries.places:places-compat`):** Deprecated since 2022-03-31. **Replacement:** Places SDK for Android (`com.google.android.libraries.places:places`). **Symptom:** Frozen at v2.6.0; no new features or bug fixes.
- **`AutocompleteFragment` class:** Decommissioned since 2025-09-25. **Replacement:** Place Autocomplete (New) widget (`PlaceAutocomplete`). **Symptom:** Class removed from the SDK in 5.0.0 (`AutocompleteSupportFragment` was also removed in 6.0.2).

## What you can do with Places SDK for Android

See the guides linked below for each task, or compare across products in the
[Capabilities Explorer](https://developers.google.com/maps/documentation/capabilities-explorer.md.txt).

### Places SDK for Android: Generative AI

- [Return an AI-powered summary of user reviews for a specified Google Place identifier.](https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/model/Place.Field.md.txt#REVIEW_SUMMARY)
- [Return an AI-powered place summary of the area and amenities surrounding a specified Google Place identifier for an electric vehicle charging station.](https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/model/Place.Field.md.txt#EV_CHARGE_AMENITY_SUMMARY)

### Places SDK for Android: Places

- [Return a list of places and place details based on a query string.](https://developers.google.com/maps/documentation/places/android-sdk/text-search.md.txt)
- [Return a list of places and place details near a specific location.](https://developers.google.com/maps/documentation/places/android-sdk/nearby-search.md.txt)
- [Return autocomplete results about places based on a query string.](https://developers.google.com/maps/documentation/places/android-sdk/place-autocomplete.md.txt)
- [Return detailed information about a specific place.](https://developers.google.com/maps/documentation/places/android-sdk/details-place.md.txt)
- [Return photos of a specific place.](https://developers.google.com/maps/documentation/places/android-sdk/place-photos.md.txt) **Note:** Display each photo's author attributions (the author's name, linked to their profile URI) with the photo. The Places policies for each platform require this, for example /maps/documentation/javascript/policies#photo-attributions and /maps/documentation/places/web-service/policies#photos-and-review.
- [Resize place photos.](https://developers.google.com/maps/documentation/places/android-sdk/place-photos.md.txt#maximum-height-or-maximum-width)
- [Return ratings and reviews for a specific place.](https://developers.google.com/maps/documentation/places/android-sdk/details-place.md.txt) **Note:** In Places API (New) web service, Place Details is an HTTP GET request to https://places.googleapis.com/v1/places/{placeId} with X-Goog-FieldMask (for example, rating,userRatingCount,reviews); Text Search, Nearby Search, and Autocomplete use POST. On Android, pass Place.Field.RATING, USER_RATING_COUNT, and REVIEWS to PlacesClient.fetchPlace(). On iOS, pass GMSPlacePropertyRating, GMSPlacePropertyUserRatingsTotal, and GMSPlacePropertyReviews in GMSFetchPlaceRequest.
- [Add an autocomplete widget to a web page or app that returns results about places based on a query string.](https://developers.google.com/maps/documentation/places/android-sdk/place-autocomplete.md.txt#autocomplete-widget)
- [Specify the data fields included in place information responses.](https://developers.google.com/maps/documentation/places/android-sdk/data-fields.md.txt)
- [Specify the place types to include in place information responses.](https://developers.google.com/maps/documentation/places/android-sdk/place-types.md.txt)
- [Return the URI to open the place details page in Google Maps for a place.](https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/model/Place.Field.md.txt#GOOGLE_MAPS_LINKS)
- [Return information about the place where the user's device is currently located.](https://developers.google.com/maps/documentation/places/android-sdk/nearby-search.md.txt) **Note:** Legacy Current Place methods were removed in Places SDK for Android v6.0+ and Places SDK for iOS v11.0+; retrieve device coordinates from platform location services and call Nearby Search.
- [Return an AI-powered overview summary for a specific place.](https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/model/Place.Field.md.txt#GENERATIVE_SUMMARY)
- [Return an AI-powered area summary describing places in the area around a specific place.](https://developers.google.com/maps/documentation/places/android-sdk/reference/com/google/android/libraries/places/api/model/Place.Field.md.txt#NEIGHBORHOOD_SUMMARY)
- [Return information about places based on a query string that are located along a predefined route.](https://developers.google.com/maps/documentation/places/android-sdk/search-along-route.md.txt)
- [Return distance, travel time, and directions URI to text-search places from a set of latitude/longitude coordinates.](https://developers.google.com/maps/documentation/places/android-sdk/routing-summary.md.txt#use-text-search)
- [Return distance, travel time, and directions URI to nearby places from a set of latitude/longitude coordinates.](https://developers.google.com/maps/documentation/places/android-sdk/routing-summary.md.txt#use-nearby-search)
- [Return distance, travel time, and directions URI between the origin for a predefined route and each of the places returned based on a query string, that are also located along the route.](https://developers.google.com/maps/documentation/places/android-sdk/routing-summary-sar.md.txt)
- [Return distance, travel time, and directions URI between each of the places returned based on a query string, that are also located along a predefined route, and the route destination.](https://developers.google.com/maps/documentation/places/android-sdk/routing-summary-sar.md.txt)

### Places SDK for Android: Places UI Kit

- [Apply CSS styling to a place data UI element.](https://developers.google.com/maps/documentation/places/android-sdk/places-ui-kit-custom-styling.md.txt) **Note:** CSS custom properties apply to Maps JavaScript API Places UI Kit elements; Places SDK for Android and Places SDK for iOS style Place UI Kit views programmatically using theme and style attributes. EEA COMPLIANCE REQUIREMENT: For showing place data on a map in the European Economic Area (EEA), do not call Places API web services from a backend server. Use client-side Places UI Kit components on the target platform (Maps JavaScript API on web, Places SDK for Android on Android, or Places SDK for iOS on iOS). See the [EEA requirements and FAQ](https://developers.google.com/maps/comms/eea/faq.md.txt).
- [Customize place data UI element styling and configurations with a UI element customization tool.](https://developers.google.com/maps/documentation/places/android-sdk/places-ui-kit-customization-tool.md.txt) **Note:** EEA COMPLIANCE REQUIREMENT: For showing place data on a map in the European Economic Area (EEA), do not call Places API web services from a backend server. Use client-side Places UI Kit components on the target platform (Maps JavaScript API on web, Places SDK for Android on Android, or Places SDK for iOS on iOS). See the [EEA requirements and FAQ](https://developers.google.com/maps/comms/eea/faq.md.txt).
- [Add a UI element that displays information about a specific place to a web page or mobile app.](https://developers.google.com/maps/documentation/places/android-sdk/place-details-ui-kit.md.txt) **Note:** On web (Maps JavaScript API), use `gmp-place-details`, `gmp-place-details-compact`, `gmp-advanced-place-details`, or `gmp-advanced-place-details-compact`. On Android (Places SDK for Android), use `PlaceDetailsFragment`, `PlaceDetailsCompactFragment`, `AdvancedPlaceDetailsFragment`, or `AdvancedPlaceDetailsCompactFragment` for Views, or the `AdvancedPlaceDetails` and `AdvancedPlaceDetailsCompact` Jetpack Compose `@Composable` functions. On iOS (Places SDK for iOS), use `PlaceDetailsView`, `PlaceDetailsCompactView`, `AdvancedPlaceDetailsView`, or `AdvancedPlaceDetailsCompactView`. EEA COMPLIANCE REQUIREMENT: For showing place data on a map in the European Economic Area (EEA), do not call Places API web services from a backend server. Use client-side Places UI Kit components on the target platform (Maps JavaScript API on web, Places SDK for Android on Android, or Places SDK for iOS on iOS). See the [EEA requirements and FAQ](https://developers.google.com/maps/comms/eea/faq.md.txt).
- [Add a customizable place details UI element with configurable action buttons and filtered reviews and media to a web page or mobile app.](https://developers.google.com/maps/documentation/places/android-sdk/advanced-place-details-ui-kit.md.txt) **Note:** Bills the Places UI Kit Pro SKU. On web (Maps JavaScript API), use `gmp-advanced-place-details` (`AdvancedPlaceDetailsElement`) or `gmp-advanced-place-details-compact` (`AdvancedPlaceDetailsCompactElement`). On Android (Places SDK for Android), use the Jetpack Compose `@Composable` functions `AdvancedPlaceDetails` (vertical full layout, supporting `SearchReviewsOptions` and `SearchMediaOptions`) and `AdvancedPlaceDetailsCompact` (vertical or horizontal compact layout, supporting `SearchMediaOptions` and custom content slots via the `slots` lambda (`basicSectionTop` and `basicSectionBottom`)), or the Fragment views `AdvancedPlaceDetailsFragment` and `AdvancedPlaceDetailsCompactFragment`; hiding the place name (omitting `NAME` from `content`) is supported on the composables. On iOS (Places SDK for iOS), use `AdvancedPlaceDetailsView` or `AdvancedPlaceDetailsCompactView` (custom content slots via `placeDetailsCompactContentSlot` are supported on `AdvancedPlaceDetailsCompactView`). EEA COMPLIANCE REQUIREMENT: For showing place data on a map in the European Economic Area (EEA), do not call Places API web services from a backend server. Use client-side Places UI Kit components on the target platform (Maps JavaScript API on web, Places SDK for Android on Android, or Places SDK for iOS on iOS). See the [EEA requirements and FAQ](https://developers.google.com/maps/comms/eea/faq.md.txt).
- [Add a UI element that displays a list of places based on a query string to a web page.](https://developers.google.com/maps/documentation/places/android-sdk/place-search-ui-kit.md.txt) **Note:** Supported on both web pages (Maps JavaScript API) and mobile apps (Places SDK for Android and Places SDK for iOS). EEA COMPLIANCE REQUIREMENT: For showing place data on a map in the European Economic Area (EEA), do not call Places API web services from a backend server. Use client-side Places UI Kit components on the target platform (Maps JavaScript API on web, Places SDK for Android on Android, or Places SDK for iOS on iOS). See the [EEA requirements and FAQ](https://developers.google.com/maps/comms/eea/faq.md.txt).
- [Add a UI element that displays a list of places near a specific location to a web page.](https://developers.google.com/maps/documentation/places/android-sdk/place-search-ui-kit.md.txt) **Note:** Supported on both web pages (Maps JavaScript API) and mobile apps (Places SDK for Android and Places SDK for iOS). EEA COMPLIANCE REQUIREMENT: For showing place data on a map in the European Economic Area (EEA), do not call Places API web services from a backend server. Use client-side Places UI Kit components on the target platform (Maps JavaScript API on web, Places SDK for Android on Android, or Places SDK for iOS on iOS). See the [EEA requirements and FAQ](https://developers.google.com/maps/comms/eea/faq.md.txt).
- [Add a basic autocomplete UI element to a web page or app that returns Google Place identifiers based on a query string.](https://developers.google.com/maps/documentation/places/android-sdk/basic-place-autocomplete-ui-kit.md.txt) **Note:** EEA COMPLIANCE REQUIREMENT: For showing place data on a map in the European Economic Area (EEA), do not call Places API web services from a backend server. Use client-side Places UI Kit components on the target platform (Maps JavaScript API on web, Places SDK for Android on Android, or Places SDK for iOS on iOS). See the [EEA requirements and FAQ](https://developers.google.com/maps/comms/eea/faq.md.txt).
- [Subscribe to analytics events from user interactions with place data UI elements.](https://developers.google.com/maps/documentation/places/android-sdk/places-ui-kit-analytics.md.txt#subscribe-to-and-handle-analytics-events) **Note:** Analytics events are intended for telemetry and analytics rather than critical UI navigation, because callback timing is not guaranteed to be synchronous and events or tags may change over time. On web (Maps JavaScript API), add a gmp-analytics event listener to Settings.getInstance(). On Android (Places SDK for Android), wrap Places UI Kit composables (AdvancedPlaceDetails or AdvancedPlaceDetailsCompact) in ProvidePlacesAnalyticsHandler. On iOS (Places SDK for iOS), attach the onPlaceAnalyticsEvent modifier to a Places UI Kit view or parent container.
- [Respond to user taps on a place data UI element.](https://developers.google.com/maps/documentation/places/android-sdk/places-ui-kit-analytics.md.txt#add-and-handle-card-tap-callbacks) **Note:** Supported on Android and iOS only (not supported on web). Card tap callbacks pass a Place containing the place ID, coordinates, and viewport bounds for UI actions such as centering a map or opening full place details. On Android, pass the onClick parameter to Places UI Kit composables (AdvancedPlaceDetails or AdvancedPlaceDetailsCompact). On iOS, attach the onTap modifier directly to the Places UI Kit view before generic SwiftUI View modifiers.
- [Display place data UI elements with a grounding content token from an AI agent response.](https://developers.google.com/maps/ai/agentic-data-visualization-token.md.txt#add-token) **Note:** Only `search_places` and `search_along_route` from Maps Experience agent tools (`mapstools.googleapis.com`) issue `contentToken` (not Grounding with Google Maps). Tokens waive Places UI Kit charges for 10 minutes on supported components under the same Cloud project; invalid or expired tokens bill at standard rates without an error.