I am trying to develop an app which can display the schools and airports in the locality. I found that using Google Places API is the way to go.
I have seen the documentation here... Can anyone explain how to use the API?
Places API is not free, however, once you set up your billing account, you will be entitled for a one time $300 free credit(usable for Google Cloud Platform products) and a monthly recurring $200 free credit(exclusive for Google Maps Platform products), after consuming the credits, you will receive an OVER_QUERY_LIMIT ...
The Places API lets you search for place information using a variety of categories, including establishments, prominent points of interest, and geographic locations. You can search for places either by proximity or a text string.
The autocomplete widget is a search dialog with built-in autocomplete functionality. As a user enters search terms, the widget presents a list of predicted places to choose from. When the user makes a selection, a Place instance is returned, which your app can then use to get details about the selected place.
Go to the Google Maps Platform > Credentials page. On the Credentials page, click Create credentials > API key. The API key created dialog displays your newly created API key. Click Close.
New tutorial available
It appears that the original tutorial by Brian is now 404, so here is a link to the Google one in case people see this answer first.
https://developers.google.com/places/android-api/current-place-tutorial
When this article was first written this tutorial didn't exist.
Original:
You could try this tutorial (now 404): http://blog.brianbuikema.com/2010/08/android-development-part-1-using-googles-places-api-to-develop-compelling-location-based-mobile-applications/
You can find a tutorial on the Places API in a J2SE environment, using the Google APIs Client Library for Java on my blog. It also includes a sample application in Github that might get you started.
If should be fairly easy to port to Android, as the Google APIs Client Library for Java is Android compatible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With