Google Places API for Android - PlacePikcer without search option

二次信任 提交于 2019-11-30 02:06:14

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

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.

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

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. :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!