I think I could use MultiAutoCompleteTextView to show hints. But how can I get some hints from Geocode API while typing it (e.g. where there are at least 3 letters typed)
Any idea?
On Android you can use Places API for Android.
Please look at this web site:
https://developers.google.com/places/android-api/
Places API for Android provides Place autocomplete and Place picker.
Related
I created a Quotes App, using an API to call the quotes, using retrofit, and now I want the app to have the option of translating all to Portuguese, Spanish and English. I’m new at coding can someone please help me?, how can I do that?
(The language of my app is #Kotlin)
Assuming you have no way of requesting different language versions of the quotes, your best bet is to use a third-party API to do the translation.
This might be more than you want to tackle, but Google does have an ML kit to provide text translation: Translate text with ML Kit on Android
I've never used it, but it doesn't seem too difficult for basic text translation to a few languages.
That's not something that can be done directly.
I guess the best approach to achieve that functionality would be using a second API for translating the result of the query from the first API.
Just Google "Translation API".
I want to implement Google Voice Search in my app. The module is simple where I speak "Cafe" and application goes to Google Map and returns me relevant results. Is there any tutorials for this?
I am afraid that the answer is NO. In order to archive what you want, you have to learn 2 things:
Speech to text with Speech to text guide
Use Place Search api to retrieve the Places results and display it on the map.
I'm trying to develop an app which needs to list airport names in world on an android autocomplete textview. I m trying to use google places api. But couldn't do it. What is the best way to do this. Thank you in advance.
hey arya you can go through this tutorial for reference , i found this tutorial very useful have a look-
google places and maps
in this tutorial you can replace cafe/Restaurants with airports and increase the radius size.
You could use Google places/Autocomplete api with the filter as airport.
You could run an async thread to fetch the result via their api or use their library to do the same. Check the below link for more.
https://developers.google.com/places/android-api/start
https://developers.google.com/places/supported_types
Also I suggest using a simple textview with a recyclerview below it for pure ui purposes. Basically the user has more space when the results are displayed on the entire screen than via an autocomplete view. This upto your choice.
I encountered the same problem too. Sadly, there is no way to correctly filter for airports using google places api for now. The only sets of filters that work are TYPE_ESTABLISHMENTS, TYPE_GEOCODE , TYPE_ADDRESS ... see table 3 for a list of supported filters for autocomplete
I have searched extensively for an answer to this question. I am attempting to use the Google Places API (Android not Javascript or the JSON/XML request) for a android project I have been wanting to do. I have looked at the documentation, though had no luck finding how to enable the API to look for places in a bigger search area such as a city and/or a certain area nearby . Is their a way of doing this?
Any input will keep my sanity so I thank anyone in advance for giving input.
I'm trying to create an autocomplete textview to search for addresses and display them on my map, but i'm having some problems with the suggestion fetching.
For this i'm using the geocoder function getFromLocationName.
In order to get a response (and sometimes a pretty bad one) i have to input into the search a whole word plus a number, and for it to suggest something even close, the string has to be almost the same as the google name for that street.
Is there any other way yo make a street suggestion text field? So far i've solved the need for a number by adding " 1" to the input string if it didn't have any numbers in it, but it's still pretty far off of the way the suggestions work on google maps.
Thanks in advance for any tips you can give me.
The Geocoder APis aren't designed for this type of request. Usually you feed the full name of the street/city/etc to it and it will translate it into coordinates.
Use the Google Places Autocomplete instead. It will respones some suggestions for your input, which can be anything between one letter and the full address.
Note that you need to have a valid key to use this API.