How to calculate distance using coordinates from LocationManager
问题 I am using LocationManager to get the values of Latitude and Longitude of a user. These values are updated regularly to a database. Now, i want to find out the distance between two users basing on the stored Latitude and Longitude values. I want to display a message when distance between two users is less than (say 100 meters). Can anyone please guide me with a tutorial or some sample code of how to achieve it. 回答1: You can have a look at the Location class. You can set the longitude and