I want to check if the current location of the user is in a certain radius to a marker. Should I do it with distanceBetween()
?
What arguments do I have to pass this function and what exactly does the result say?
LatLng markerPosition = marker.getPosition();
myLocation = locationManager.getLastKnownLocation(provider);
double latitude = myLocation.getLatitude();
double longitude = myLocation.getLongitude();
distanceBetween(???);
public static void distanceBetween (double startLatitude, double startLongitude, double endLatitude, double endLongitude, float[] results) {
}
you can simple use
from Location class todo this, like: