AutocompleteActivity

public class AutocompleteActivity extends AppCompatActivity
implements PlaceSelectionListener

Implements a fullscreen activity that returns Place predictions in response to user search queries. As the user types, the autocomplete service returns suggestions for places such as businesses, addresses and points of interest.

Constant Summary

int RESULT_ERROR Result code for errors when finishing the autocomplete activity.

Inherited Constant Summary

Public Constructor Summary

Public Method Summary

void
onCreate(Bundle savedInstanceState)
void
onError(Status status)
Called when an error occurs while fetching details for the selected place autocomplete prediction.
void
onPlaceSelected(Place place)
Called when a place is selected by the user.

Inherited Method Summary

Constants

public static final int RESULT_ERROR

Result code for errors when finishing the autocomplete activity.

Constant Value: 2

Public Constructors

public AutocompleteActivity ()

Public Methods

public void onCreate (Bundle savedInstanceState)

Parameters
savedInstanceState

public void onError (Status status)

Called when an error occurs while fetching details for the selected place autocomplete prediction.

The list of possible status codes is available at PlacesStatusCodes. Errors returned are developer errors such as providing an invalid API key. Other errors such as network or timeout errors are handled by the widget.

Parameters
status

public void onPlaceSelected (Place place)

Called when a place is selected by the user.

Parameters
place