Google Places API (Android) Autocomplete just like on Google Maps

598 views Asked by At

I am working on an app in which there is a AutoCompleteTextView that returns suggestions when a user types in. Everything is working fine but I have noted that there is difference in suggestions comparing to maps.google.com. For example when I search "bakery near" in google maps it returns suggestions, but when I search same text on my test app (which uses Google Places API AutoComplete) it returns nothing. Please tell me how can I achieve the suggestions like maps.google.com.

Note: I don't want to show google maps in my app.

Google Maps Example: https://i.stack.imgur.com/7Ou3W.jpg , Google Places API AutoComplete Example: https://i.stack.imgur.com/RLf7D.png

Your help would be highly appreciated.

1

There are 1 answers

0
pushbit On

For a query like, "bakery near ...", I believe you would want to use the Query Autocomplete web service. Though even with this I do notice some differences between the results on Google Maps and this web service. I suspect that Google Maps has custom logic that moulds the input/results to be a bit more intuitive.