Reputation: 153
I am having a small issue here. In my application, the user enters the name of a place, and I should then show him the list of places having the name of the place he entered. so obviously I need to send the entered name to Google Places and I will expect it to return to me a list of descriptions to uniquely identify each place. so is there a way to get this? P.S: I searched alot, and I didn't find how to get the description of a place from its name. Thanks alot.
Upvotes: 2
Views: 530
Reputation: 3442
Android provides Geocoder class through which you can get the details of Locations.
Upvotes: 1
Reputation: 9730
The default API call to search for a list of locations based on a text query:
This will return a JSON array containing all the locations Google Places found based on what you entered at the PLACE_NAME field each containing some basic information.
If you want a more detailed description you can call:
Where REFERENCE_OF_PLACE is the reference id (retrieved in the textsearch call) of the place you want to aquire information of.
A google api key can be retrieved by registering at the Google API Console
And example how to retrieve and parse JSON can be found here.
Upvotes: 2