I'm having a little trouble understanding this function:
Location.distanceBetween(lat1, lon1, lat2, lon2, results);
I have two points at my map, my current position and one other. Which should be approximatly 30 meters away from where I am.
But still the results I get is:
results[0] = 6935649.5
results[1] = 121.08577
results[2] = 154.8537
Which doesn't make sence to me, the function tells me it should return in meters, so I expect something like 29.345345, my goal is to use this to check if my location is within say. 100 meters from another marker.
EDIT: Here are my the values I use
LatLng currentPosition; //My current position
//For all points
LatLng position; //Set to the current point
double lon1 = position.longitude;
double lat1 = position.latitude;
double lon2 = currentPosition.longitude;
double lat2 = currentPosition.latitude;