Rameshj
Rameshj

Reputation: 81

requestLocationUpdates MinDistance Unit

I want get an update of the user's location everytime he changes his location. I have used requestLocationUpdates in which min distance is there. But my doubt is what is the distance unit for this?

If I want to update when user moves 2 Km what number should I give in min distance?

Upvotes: 0

Views: 3682

Answers (1)

ianhanniballake
ianhanniballake

Reputation: 199805

Assuming you mean LocationManager's requestLocationUpdates, the Javadoc says:

minDistance, float: minimum distance between location updates, in meters

So 2Km would be 2000.

Upvotes: 9

Related Questions