13

I am building an application, where the user has to select a Place he wants.

For that, I am using the PlacePicker dialog, as the Google Places API for Android is teaching in the API reference site.

However, when the user click the button and open the Place Picker Dialog, it does not have any button where the user can type the name of the place he wants to select. So, the user will have to select a place just dragging on the map; this is horrible for the user, specially if he wants to choose a specific location far from his location or he doesn't know where is the place on the map.

So, I've tried searching on Google and foruns on the internet and I didn't find anything about how to set the dialog to appear the search button.

Thank you! ;)

Vinh VO
  • 705
  • 1
  • 7
  • 28
Gustavo Dias
  • 339
  • 2
  • 6
  • Any developments on this question? I was shocked to see that iOS PlacePicker from Google has search built in by default :/ – Mitch Dart Dec 10 '15 at 09:47
  • Also, I do not see any option that you can filter these near places by type. If I want just food places, and not other? Can I use PlacePicker or its value is for teaching purpose only? – ivan.panasiuk Dec 20 '15 at 16:08

4 Answers4

5

Unfortunately the Place Picker does not support what you are asking for.

CG Patterson
  • 626
  • 1
  • 7
  • 10
  • 1
    @unclemeat This is the correct answer to his question. The Place Picker does not support what he is asking for. The question is a very good one and I know exactly what he is asking because I wanted to do the same thing. There really isn't any other way of saying it. – CG Patterson Apr 21 '15 at 01:40
  • 1
    I was looking for the same... Specially because I saw that Hangouts is using Place Picker and it has the search button on the topbar! – Ferran Negre Jul 05 '15 at 22:37
  • Unfortunately since the place picker is a widget, it is not customisable so you will have to build your own search button in your ui which will let you do that. – Simon Jul 17 '15 at 20:44
3

From what I can see search is currently not supported in the PlacePicker API. You can look at: PlacePicker.IntentBuilder and PlacePicker @Ferran Negre: Yes, I also saw that Hangouts (version 4.0.100406486) seems to use the PlacePicker with search. I actually logged it to make sure and they do use the PlacePicker activity. SO either they copied the PlacePicker code into Hangouts and modified it (they are Google and should have access) OR there is a hidden API for showing search that for some reason has not yet been released. Even if such a hidden API exists though it would be bad practice to try to use it.

blackwabi
  • 161
  • 1
  • 6
2

It looks like that they have listened to us and they already support this feature!

We have also added the autocomplete functionality to the place picker—a UI widget that helps users communicate their current location, such as a place, address or location on a map.

http://googlegeodevelopers.blogspot.com/2015/12/autocomplete-widget-and-updated-place.html

Ferran Negre
  • 3,712
  • 3
  • 34
  • 56
0

Place picker currently not supporting option to search ,but you can use android-place-picker library by this lib you can achieve this functionality + you can display recent searched locations also.And hope Google will soon add this feature to Place Picker.till that time you can use this. :)

Gagan
  • 745
  • 10
  • 31