Using Google Places API in Android

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?


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.


You will have to get familiar with HttpClient, HttpRequest, and HttpResponse if you're not already.

Very simply:
Step 1) build your uri with your api key and search terms as per google's syntax
Step 2) perform a post using that uri
Step 3) decode the response from the post

Happy coding :)