This class is deprecated.
The Google Play Services Places SDK is deprecated. A new SDK is available.
See the client
migration guide for more information.
PlaceAutocomplete provides an activity that allows a user to start typing a place name or an address and see place predictions appear as they type.
Users are expected to choose one of the predictions. Unlike PlacePicker,
users only see a list of places, and not a full map. See the developer's guide for more
details.
If the user exits the autocomplete activity without choosing a place, the calling activity
will receive RESULT_CANCELED.
| class | PlaceAutocomplete.IntentBuilder | Builder for a Place Autocomplete launch intent. | |
| int | MODE_FULLSCREEN | Mode for launching the autocomplete activity in fullscreen. |
| int | MODE_OVERLAY | Mode for launching the autocomplete activity as an overlay. |
| int | RESULT_ERROR | Indicates that an error occurred. |
| static Place | |
| static Status |
Mode for launching the autocomplete activity in fullscreen. The app will no longer be visible while the user picks a place.
Mode for launching the autocomplete activity as an overlay. The app will be visible in the background while the user picks a place.
Indicates that an error occurred.
When this result code is returned in
onActivityResult(int, int, Intent), you should check the status returned by
getStatus(Context, Intent).
Returns the Place
selected by the user.
| context | Your application's context. |
|---|---|
| intent | The result Intent that was provided in
onActivityResult(int, int, Intent). |
Place.Returns the Status
associated with the result.
The list of possible status codes is available at PlacesStatusCodes.
You should pay specific attention to the value of
getStatus(Context, Intent) when the activity's result code is
RESULT_ERROR. This can indicate a configuration error (for example, an
invalid API key in your Android manifest) or a quota error (see Usage Limits).
| context | Your application's context. |
|---|---|
| intent | The result Intent that was provided in
onActivityResult(int, int, Intent). |