1

I tried looking at the Maps API and Locations API, but neither seemed to have a format where you just make an HTTP call and get back some JSON objects indicating location.

Let'sRefactor
  • 3,303
  • 4
  • 27
  • 43
ygu
  • 47
  • 5
  • There is nothing in Android itself for this. You need to use an outside service. – CommonsWare Jan 12 '16 at 18:39
  • I recently had the same issue. See [this question](http://stackoverflow.com/questions/33764139/points-of-interest-for-zip-code) for using a third-party – Zuzlx Jan 12 '16 at 18:41

1 Answers1

2

You can use Google's nearby search,

StringBuilder sb = new StringBuilder("https://maps.googleapis.com/maps/api/place/nearbysearch/json?");
sb.append("location="+mLatitude+","+mLongitude);
sb.append("&radius=5000");
sb.append("&types="+type);
sb.append("&sensor=true");
sb.append("&key=YOUR_API_KEY");

Pass the necessary parameters, and get it done by an AsycTask.

Please refer this for more details.

Let'sRefactor
  • 3,303
  • 4
  • 27
  • 43