3

I have searched extensively for an answer to this question. I am attempting to use the Google Places API (Android not Javascript or the JSON/XML request) for a android project I have been wanting to do. I have looked at the documentation, though had no luck finding how to enable the API to look for places in a bigger search area such as a city and/or a certain area nearby . Is their a way of doing this?

Any input will keep my sanity so I thank anyone in advance for giving input.

Mithun
  • 2,075
  • 3
  • 19
  • 26
  • have u looked at Radar Search ? – Asif Mujteba May 21 '15 at 20:20
  • https://developers.google.com/maps/documentation/javascript/places#radar_search_requests – Asif Mujteba May 21 '15 at 20:20
  • As stated in the original post: I am not looking for the javascript implementation I am looking for a solution that is in regards with android. Radar Search is not within the API [Documentation](https://developer.android.com/reference/com/google/android/gms/location/places/package-summary.html) in the Android version. So is there a way to do it similar to Radar Search naively within Android? – ToltarTheGreat May 21 '15 at 20:29
  • What exactly are you using currently to query for places? Are you using `getCurrentPlace`? – Daniel Nugent May 21 '15 at 21:12
  • I am trying to query for food places around the users area and yes I am using getCurrentPlace. Though from the tests I have done, driving around the city I live in and seeing if the results change by logging, it seems to only get places that are really close by. I want the user to be able to have the option to span his/her results to city wide locations so that way if they are not nearby a location with a lot of food places they can get results. Google seems to do it fine with Google Now, but I don't understand why I cant do it as a developer through querying. It makes me wanna pull my hair. – ToltarTheGreat May 21 '15 at 21:38
  • You could use a `PlacePicker` and call `setLatLngBounds()` to increase the radius. https://developers.google.com/places/android/placepicker – Daniel Nugent May 21 '15 at 21:42
  • Although, it sounds like you are searching for places in the background. It really sounds like the web API would be better suited for your needs. I wrote up a guide to using the web API in Android, take a look at it here: http://stackoverflow.com/questions/30161395/im-trying-to-search-nearby-places-such-as-banks-restaurants-atms-inside-the-d/30162174#30162174 – Daniel Nugent May 21 '15 at 21:47
  • Thank You Daniel your a life saver! I wish I could give you a cookie or something because I never thought of doing it that way. I thought Google gave you all the tools but I guess its kinda tricky to do this native on Android. – ToltarTheGreat May 21 '15 at 22:00

0 Answers0