Places SDK for Android supports the existing Place Autocomplete. If you are familiar with the existing Place Autocomplete, the new version of Place Autocomplete makes the following changes:
Uses a new pricing model. For pricing information for all APIs, see Places SDK for Android (New).
You must initialize your app by calling the
Places.initializeWithNewPlacesApiEnabled()
method. For more information on selecting the Places API service, see Set up your Google Cloud project.The
FindAutocompletePredictionsRequest
class contains new methods that let you:- Set the region code used to determine formatting of the results.
- Set the prediction offset, a zero-based Unicode character offset of the query.
For more information, see Autocomplete (New).
The session now concludes with a call to either Place Details (New) or Address Validation. For more information, see Autocomplete (New) and session pricing.
Example request
For a complete example, see Autocomplete (New).