I am developing an Android application that takes the user's current location and shows the gps location of other users on a map that falls with a certain radius, say, 20 kilometers.
For example, if I am a user, I want to see the locations of other users on a map that are within a radius of 20 kilometers from my location.
I can save my location, the location of other users and map them. I cannot understand if these users are within a radius of 20 kilometers from my location or not.
I use the Google Maps Android v2 Android API to place locations on a map and Analysis to save GPS locations (latitude and longitude coordinates)
I googled for solutions, but in vain. Can someone provide a hint or link or sample code on how to check if the GPS location is within a certain radius of another GPS location or not.
Any help would be appreciated.
source share