I'm experimenting with the autocomplete widget
https://developers.google.com/places/android-api/autocomplete#add_an_autocomplete_widget
it works fine. Now I'm trying to get the city and country based on user
selection and store the 3 of them in separate variables. Eg. user selects
"Southbank centre", I want to be able to retrieve "UK" and "London" and
store all 3. I looked to others threads but didn't find anything simple and
straightforward that I could use just to experiment. Unless there is no
easy way to do this.
PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment)
getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);
autocompleteFragment.setOnPlaceSelectedListener(new
PlaceSelectionListener() {
@Override
public void onPlaceSelected(Place place) {
// TODO: Get info about the selected place.
Log.i("Message", "Place: " + place.
}
Any help is appreciated
--
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/97f1c04d-11b5-43f2-9ac1-41524d63c40d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.