How to find your location on android programmatically?

How to find out a list of locations at a given location on Android?

  • My goal is to generate a list of all addresses at a given location in latitude and longitude. But I'm not sure how this can be done in Android. My initial idea was to add a radius of length L to that location, then loop through all points in that circle to list all the addresses. However, I realize this method could take a lot of time, and the result might not be accurate due to the density of each area. Besides, how large should my radius so that the result is rationale to the user. I wonder anyone has done this before could share me some experiences? Thank you.

  • Answer:

    After doing a bit of research, I found one way to handle this situation is to use Google Place API and returns JSON array of places: http://code.google.com/apis/maps/documentation/places/

Chan at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

Why not just use the maxResults parameter in the http://developer.android.com/reference/android/location/Geocoder.html#getFromLocation%28double,%20double,%20int%29 method to make sure you limit your results to a reasonable number? Am I understanding your question correctly?

Kurtis Nusbaum

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.