Release 3.4.0
The Places SDK for Android version 3.4.0 is now available. For information about this release, and for all previous releases, see the Release Notes or subscribe to the Release Notes XML feed.
If you are a new user, see Set Up in the Google Cloud Console to start the installation process.
If you are an existing customer, see the upgrade instructions at Versions.
Places SDK for Android version 3.4.0 supports two SDK versions: the existing Places SDK for Android and Places SDK for Android (New), the next generation version of the SDK.
The new features added in version 3.4.0 are all part of Places SDK for Android (New), so you must use that SDK to access the new features.
Your first task is to decide which SDK to use. This is true if you are a new customer or an existing customer already using the SDK. To learn the key differences between the two SDK versions, see Choose your SDK version.
The Places SDK for Android added support for retrieving photo URIs for a place, along with the existing ability to retrieve photo bitmaps. For more information, see Place Photos.
SKU: Place Details (Location Only) is a Preview feature that contains fields that were previously included in SKU: Place Details (Basic). Usage during Preview is at no charge.
For more information, see SKU: Place Details (Location Only).
Places SDK for Android version 3.4.0 requires a minimum of Kotlin 1.8.0. You can ensure that your Kotlin dependencies meet this minimum by updating the dependencies
section of your module-level build.gradle
file to add the kotlin-bom
dependency:
dependencies {
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
implementation 'com.google.android.libraries.places:places:3.4.0'
}
For more information on the kotlin-bom
dependency, see Usage of the latest kotlin-stdlib version in transitive dependencies.
Release 3.3.0
The Places SDK for Android version 3.3.0 is now available. For information about this release, and for all previous releases, see the Release Notes or subscribe to the Release Notes XML feed.
If you are a new user, see Set Up in the Google Cloud Console to start the installation process.
If you are an existing customer, see the upgrade instructions at Versions.
Places SDK for Android version 3.3.0 supports two SDK versions: the existing Places SDK for Android and Places SDK for Android (New), the next generation version of the SDK.
The new features added in v3.3.0 are all part of Places SDK for Android (New), so you must use that SDK to access the new features.
Your first task is to decide which SDK to use. This is true if you are a new customer or an existing customer already using the SDK. To learn the key differences between the two SDK versions, see Choose your SDK version.
Place Details now includes the new Review
class and the new language code for the name string in the response Place
object. You must use Places SDK for Android (New) to be able to access these new fields.
Use the new Place.getReviews()
method to return up to five reviews for a place.
Use the new Place.getNameLanguageCode()
method to access the language code.
For more information, see Place Details.
The Places SDK for Android (New) adds the AuthorAttributions
field to the PhotoMetadata
class used by Place Photos. You must use Places SDK for Android (New) to be able to access author attributions.
The PhotoMetadata
object returned by Place.getPhotoMetadas()
can contain one or more author attributions represented by a List
of AuthorAttribution
objects.
Added Text Search, which 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". You must use Places SDK for Android (New) to be able to use Text Search.
New place type values are now available. You must use Places SDK for Android (New) to be able to access new type values.
Use the new Place.getPlaceTypes()
method to access these new types.
Places SDK for Android version 3.3.0 requires a minimum of Kotlin 1.8.0. You can ensure that your Kotlin dependencies meet this minimum by updating the dependencies
section of your module-level build.gradle
file to add the kotlin-bom
dependency:
dependencies {
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
implementation 'com.google.android.libraries.places:places:3.3.0'
}
For more information on the kotlin-bom
dependency, see Usage of the latest kotlin-stdlib version in transitive dependencies.
If you run into errors for "Missing classes detected while running R8", please add the following rules to your existing keep rules in proguard-rules.pro
:
-dontwarn io.grpc.internal.DnsNameResolverProvider
-dontwarn io.grpc.internal.PickFirstLoadBalancerProvider
New place type values have been added in v3.3.0. You must use Places SDK for Android (New) to be able to access new type values.
These new type values are not accessible by the existing Place.getTypes()
method. Place.getTypes()
in the Places SDK for Android
is deprecated as of v3.3.0.
Instead, use Place.getPlaceTypes()
.
The minimum version of the Places SDK for Android with Place.getPlaceTypes()
is v3.3.0.
Release 3.2.0
The Places SDK for Android version 3.2.0 is now available. For information about this release, and for all previous releases, see the Release Notes or subscribe to the Release Notes XML feed.
If you are a new user, see Set Up in the Google Cloud Console to start the installation process.
If you are an existing customer, see the upgrade instructions at Versions.
To clarify which class provides supported String constants for filtering Place Autocomplete predictions, the TypeFilter
class in the Places SDK for Android
is deprecated as of v3.2.0.
Instead, use PlaceTypes
. For more information, see Filter results by place type or type collection.
The minimum version of the Places SDK for Android with PlaceTypes
is v2.7.0. The v2.7.0 release notes have been amended to clarify that the deprecated methods in v2.7.0 should use PlaceTypes
instead of TypeFilter
.
Place Details now supports the following new Atmosphere Data Field, which contains a summary of a place up to 150 characters in length:
Place.Field.EDITORIAL_SUMMARY
The Place class now contain the following new methods to support this field:
getEditorialSummary()
getEditorialSummaryLanguageCode()
Release 3.1.0
The Places SDK for Android version 3.1.0 is now available. For information about this release, and for all previous releases, see the Release Notes or subscribe to the Release Notes XML feed.
If you are a new user, see Set Up in the Google Cloud Console to start the installation process.
If you are an existing customer, see the upgrade instructions at Versions.
To simplify filtering results by country, the following methods in the Places SDK for Android are deprecated as of v3.1.0:
FindAutocompletePredictionsRequest.Builder.setCountry(String countryCode)
Autocomplete.setCountry(String country)
AutocompleteSupportFragment.setCountry(String country)
FindAutocompletePredictionsRequest.getCountry()
Instead, use the following methods. The minimum version of the Places SDK for Android with the following methods is v2.2.0:
FindAutocompletePredictionsRequest.Builder.setCountries(List<String> countries)
Autocomplete.IntentBuilder.setCountries(List<String> countries)
AutocompleteSupportFragment.setCountries(List<String> countries)
FindAutocompletePredictionsRequest.getCountries()
To provide a more convenient method for checking on open status of a place, Place.isOpen()
is deprecated as of v3.1.0. Instead, use PlacesClient.isOpen()
. The minimum version of the Places SDK for Android with PlacesClient.isOpen()
is v3.1.0.
For more information on PlacesClent.isOpen()
, see Get open status.
Place Details now supports the following new Basic Data Field:
Place.Field.WHEELCHAIR_ACCESSIBLE_ENTRANCE
And the following new Atmosphere Data Fields:
Place.Field.RESERVABLE
Place.Field.SERVES_BEER
Place.Field.SERVES_BREAKFAST
Place.Field.SERVES_BRUNCH
Place.Field.SERVES_DINNER
Place.Field.SERVES_LUNCH
Place.Field.SERVES_VEGETARIAN_FOOD
Place.Field.SERVES_WINE
The following methods have been added to Place:
getCurrentOpeningHours()
returns a place's hours of operation over the next seven days. The time period starts at midnight on the date of the request and ends at 11:59 pm six days later.
getSecondaryOpeningHours()
returns a place's secondary hours of operation over the next seven days. Secondary hours are different from a business's main hours. For example, a restaurant can specify drive through hours or delivery hours as secondary hours.
Release 3.0.0
The Places SDK for Android version 3.0.0 is now available. For information about this release, and for all previous releases, see the Release Notes or subscribe to the Release Notes XML feed.
If you are a new user, see Set Up in the Google Cloud Console to start the installation process.
If you are an existing customer, see the upgrade instructions at Versions.
According to the Mobile OS version support policy, we are freezing support for Android 4 (API levels 20 and below) as of Places SDK for Android v3.0.0. The new minSDK is Android 5 (API level 21). Earlier Places SDK versions will continue supporting Android 4.
If your dependencies do not specify a version number, your IDE will load the newest SDK version and new builds of your app will not support Android 4.
Specify a version of the Places SDKs for Android in your application's build dependencies in order to control when you raise the minimum supported OS for new versions of your app.
Place Details now supports four new Atmosphere Data Fields:
Place.Field.TAKEOUT
Place.Field.DELIVERY
Place.Field.DINE_IN
Place.Field.CURBSIDE_PICKUP
Added new Place.BooleanPlaceAttributeValue class that defines the values of these new place attribute fields.
]]>Release 2.7.0
The Places SDK for Android version 2.7.0 is now available. For information about this release, and for all previous releases, see the Release Notes or subscribe to the Release Notes XML feed.
If you are a new user, see Set Up in the Google Cloud Console to start the installation process.
If you are an existing customer, see the upgrade instructions at Versions.
To provide expanded support for filtering Place Autocomplete by multiple place types, the following are deprecated as of v2.7.0:
AutocompleteSupportFragment.setTypeFilter(TypeFilter typeFilter)
FindAutocompletePredictionsRequest.Builder.setTypeFilter(TypeFilter typeFilter)
Autocomplete.IntentBuilder.setTypeFilter(TypeFilter typeFilter)
Instead, use:
AutocompleteSupportFragment.setTypesFilter(List<String> placeTypes)
FindAutocompletePredictionsRequest.Builder.setTypesFilter(List<String> placeTypes)
Autocomplete.IntentBuilder.setTypesFilter(List<String> placeTypes)
The minimum version of the Places SDK for Android with setTypesFilter(List<String> placeTypes)
is v2.7.0.
Added the setTypesFilter(List<String> placeTypes)
method to AutocompleteSupportFragment, FindAutocompletePredictionsRequest.Builder, and Autocomplete.IntentBuilder. Use this method to specify up to five values to restrict results from a Place Autocomplete request.
For more information, see Filter results by place type or type collection.
If your app does not use PlacesClient.findCurrentPlace()
, you must now explicitly remove both the
ACCESS_FINE_LOCATION
and ACCESS_COARSE_LOCATION
permissions. In previous releases, you only had to remove ACCESS_FINE_LOCATION
.
For more information, see Current Place.
122841340: When you call Places.initialize(Context, String, Locale)
and the specified Locale
is different from the device's locale, the autocomplete widget now localizes both the search hint and the search results based on the setting of Locale
. If you omit Locale
, then it uses the device's locale.