The Places SDK lets you search for and retrieve information for a variety of place types using a text string or by proximity. Places SDK is the legacy version of Places SDK (New).
Use this guide to understand the key differences between the Places SDK versions and migrate to Places SDK (New).
SDK features available in each version
The following table shows which SDK and API versions are required for each SDK feature:
Feature | Places API enabled on API key | Initialization method | Minimum SDK version |
---|---|---|---|
Autocomplete (New) | Places API (New) | initializeWithNewPlacesApiEnabled() |
3.5.0 |
Place Details (New) | Places API (New) | initializeWithNewPlacesApiEnabled() |
3.3.0 |
Nearby Search (New) | Places API (New) | initializeWithNewPlacesApiEnabled() |
3.5.0 |
Place Photos (New) | Places API (New) | initializeWithNewPlacesApiEnabled() |
3.4.0 |
Text Search (New) | Places API (New) | initializeWithNewPlacesApiEnabled() |
3.3.0 |
Place Autocomplete | Places API | initialize() |
|
Current Place | Places API | initialize() |
|
Place Details | Places API | initialize() |
|
Place Photos | Places API | initialize() |
Migrate to the new APIs
To migrate to the new APIs, see the following migration guides:
Enhancements in Places SDK for Android (New)
This section covers key features added to Places SDK for Android (New).
Implemented on the Google Cloud standard platform
Places SDK for Android (New) is implemented on the service infrastructure on Google Cloud. This implementation brings a more secure and trusted platform. This standard design brings a level of consistency across the SDKs that improve the efficiency of development with Places SDK for Android (New).
Improved performance
Places SDK for Android (New) provides improved performance, making it worthwhile to replace apps that use the existing SDK.
New features
The Places SDK for Android (New) includes the latest versions of all of the SDK features:
New Text Search service
Text Search (New) returns information about a set of places based on a string — for example "pizza in New York" or "shoe stores near Ottawa" or "123 Main Street". The service responds with a list of places matching the text string and any location bias that has been set.
New response data added to Placed Details (New) and Place Photos (New)
Place Details (New) now includes the new Review class in the response
Place
object. The Place class contains the newgetReviews()
method to support this field. CallgetReviews()
to return up to five reviews for a place.Place Photo (New) adds the
AuthorAttributions
to thePhotoMetadata
class.AuthorAttributions
contains aList
ofAuthorAttribution
objects.
New URI response added to Place Photos (New)
You can now use Place Photo (New) to return a URI to an image bitmap. Previously, you could only return the image bitmap itself.
Simplified pricing
Pricing is simplified with Places SDK for Android (New) so that you only pay for the data you use. Simplified pricing is implemented using field lists, also called field masks.
With Place Details and Text Search you use field lists to control the list of fields to return in the response. You are then only billed for the data requested. Using a field list is a good design practice to ensure that you don't request unnecessary data, which helps to avoid unnecessary processing time and billing charges.
For detailed pricing information for both SDKs, see Usage and Billing.
Expanded place types
The new SDK includes new place types, which are returned as part of the Place Details and Text Search response. You can also use these new types, and the existing types, in a search with Text Search. The new types are included in Table A.