I have implemented google location search like OlaCabs app but it is not as fast in searching as OlaCabs do.Reason behind it is I need to hit a rest api (Google Place api) to find locations as per text search. I noticed that in olacab app there is some text showing "powered by Google"(Look screen below).So I just want to know:
1.Is there any api provided by google for android rather than rest api ?
2.If OlaCaps using some paid google search API then what is it and form where can I buy it?
You seem to be looking for Google Places Autocomplete API
Most of Google APIs are free till some courtesy limit (different for each API) and paid afterwards. Courtesy limits are higher if you have given your credit card info. Still if you are beyond free limit, you should consider paying for them.
You are in search of Google places autocomplete.
I figured Google has the Place Autocomplete service using which I can allow the user to type in a city name which’ll fetch all the cities containing that string from Google’s servers that can be presented in an AutoCompleteTextView.
Link :
*http://codetheory.in/google-place-api-autocomplete-service-in-android-application/
Hope it will* help you.
Related
Research how to configure Google Places API key for the Android app, given the API restrictions limit us based on referring website.
Now Google consider Place API as Web-service so it is compulsory to restrict API key with IP address. So i got null result in android code and it says that "API key not restricted" so now how to use API key in Android App for getting near by places result.
Please see https://developers.google.com/places/android-sdk/get-api-key#restrict-key for instructions to restrict your API key for use with your Android app.
To achieve displaying nearby places using the Places SDK for Android, you have two options:
Use PlacesClient.findCurrentPlace() to get the most likely places immediately around the device's current location.
Use Autocomplete with either setLocationBias or setLocationRestriction to allow the user to type a particular place name or query that they would like to search for around a specific location.
How can i get a list of addresses (street, av., etc) from Google?
I have seen some apps that you just start typing (waze for example) and it shows a list of adresses (probably from Google) that you can use to fill your search.
There is some API from Google that we can do that?
I think you should try Google Places Api, check this out.
https://developers.google.com/places/android-api/autocomplete
There are heaps of info about how to use this Api, which is really simple.
How do I get a Google Places API key for my Android App
Bye
Take a look at Google Places API (especially at PlacePicker).
https://maps.googleapis.com/maps/api/place/nearbysearch/json?rankby=distance&location=LATITUDE,LONGITUDE&rankBy=50000&types=grocery_or_supermarket&sensor=true&name=NAMESEARCH&key=SERVER_KEY
how to use this link to return json format for the results, I already have an Server Key but it keep saying that "This IP, site or mobile application is not authorized to use this API key."
The official way to integrate Google Places API is through the Android implementation. You could use the PlacePicker which takes care the most but if you have a need that it doesn't fill, then you could integrate just the Place Autocomplete to your own UI.
Having said this if you would insist using the service url directly in an Android app, then you would need to configure a Browser Key in the Google Developer Console.
You shouldn't. Android has its own way to query places through the GooglePlayApiClient (read more here). You still want to use the web service you need a server key. From the documenation
Note: The Google Places API Web Service does not work with an Android
or iOS API key.
you can get the key here. Please, note that key has a limitation of 15k text searches per day. If you need more you will have to apply for a premium plane
I want you to delete the current server_key.
Create a new Server_Key.
It takes 10 mintues to activate the server_key, otherwise you will get error_message "The provided API key is expired".
Now hit the url voila it works!!!
I have run into a Problem.
Basically, google web services allows a maximum amount of 1000 requests per day unless you verify your credit card (which I as a student, don't have).
I am building an android application which will help you find food near you and give you tips and whatnot. But heres the problem. I have reached the daily cap multiple times just due to testing the app & debugging it... And that is a serious issue...
I know how SQLite databases & so on work, and how to use them, but is that the way one would go when using google places web services? Is that even allowed?
Here is the basic process of what is happening:
Open App & Get the users location
Search and Mark nearby food sources (restaurants & whatnot)
This is done via getting a HTTP request with "Place Search"
Place search itself deliveres little information, not enough, so I get a "Detail Search" for every place it finds.
All the results (Max. 60) are marked on the map and saved in a DataHolder class storing all the DataModel classes.
this works fine and as intended, also if I close and restart the app, it will "work". But it will redownload all the data and the details. As you can imagine, this busts my 1000 request limit pretty damm fast.
So is there a common practice/structure on how developers persist this "Google API" data? I feel the way im doing it very inefficient both for me and the user...
Thanks.
If you are developing a web based application that only needs to search for places, and does not submit new places, you should use the Places Library of the Google Maps Javascript API rather than the Google Places API Web Service. The Places library assigns a quota to each end user rather than to each key. This means that your available quota increases with your user base rather than being capped at a fixed amount.
You can use Places API for Javascript https://developers.google.com/maps/documentation/javascript/places
It has all features of server version. You could try to use it with invisible WebView, or better with Rhino.
I have been going through the Google Places API and to make optimum use of the API in my app, I need clarity on their Terms of Service regarding Google places API.
My application shows nearby restaurants to a user.
In my database, I have manually collected all the restaurant information such as name, photos, reviews, opening time etc. Please note that this collection has been done manually and not with the Google API.
Now, since Google allows to cache id of places, I have manually mapped their id to my restaurants.So, my database has five fields. id, name, photos, reviews and opening time. Again to reiterate, only the id's are from google, all other data has been manually collected by me.
The reason for doing this is that I want to serve a mix of both info for nearby restaurants. I would always hit Google places API at run time, and along with the information from their api, I would also serve my custom data.
I want to know if this is ok. Google's terms of usage are not very clear, so it would be great if someone can clarify this.
Thanks.
This is A-OK! Supporting your use case is actually why we updated the rules recently to make place IDs exempt from the caching restriction. Just be sure that when you do call Places API to display the place information, you're including the appropriate logo and attribution requirements.