0

I am trying to build an application that could take a specified grocery store name and find the closest store to my location... After some research, I have come to the conclusion that I should use Google Places API, but the problem is I can't figure out how to use it in my code and the Google developper documentation does not help at all. Is there any good tutorial out there that could help? Or is there a better solution than using Google Places to resolve my problem? Any answer will be much appreciated.

Kevin Pelland
  • 11
  • 1
  • 8
  • Trust me, google apis are the better than anything, Surely google places api will do the thing you want, and there are lots of good tuts on internet. but it depends on your skills, are you a newbie or pro? – Shivansh Apr 26 '15 at 18:20
  • I'm don't have a lot of experience with Google APIs, which make the task much harder. – Kevin Pelland Apr 26 '15 at 18:24
  • try this link http://javapapers.com/android/find-places-nearby-in-google-maps-using-google-places-apiandroid-app/ atleast it will let you get started with it – Shivansh Apr 26 '15 at 18:58
  • @Shivanshsaini With your link I was able to find the nearest grocery stores to a specific location. I really can't thank you enough! :) – Kevin Pelland Apr 27 '15 at 04:16

2 Answers2

2

1- First go through this tutorial for getting familiar with Android Google Maps.

2- To retrive the current location of device see this answer or this another answer.

3- Then you can get places near by your location using Google Place API and for use of Place Api see this blog.

4- After getting Placemarks of near by location use this project to show markers on map with balloon overlay.

After following these steps you will be easily able to do your application. The condition is only that you will have to read it and understand, because like magic its not going to be complete in a click.

Community
  • 1
  • 1
Ahmad Ebrahimi
  • 267
  • 5
  • 24
0

Welcome to StackOverflow! Perhaps this answer: https://stackoverflow.com/a/10444127/1683141 can be helpful to you. It provides a full setup tutorial.

The example shows how to get ATM's near a static lon/lat, but you should be able to change that to a supermarket based on the users lon/lat.

Community
  • 1
  • 1
Mdlc
  • 7,128
  • 12
  • 55
  • 98