-1

I want to get the distance that the device moved between the start location and the end location. I'm getting the speed and the time user spent on the journey using GPSManager and GPSCallback.

Is there any way to get the accurate distance between start and end locations? Here user doesn't know what the end location is. It is the location where the user stops the journey.

The Ark A
  • 3
  • 4
  • 1
    The length of a straight line between start and finish? Or the actual distance along the traveled road? – blackapps Mar 08 '22 at 18:13
  • @blackapps The actual length of the traveled road. Its like real-time journey from one location to another location. – The Ark A Mar 08 '22 at 18:18
  • And what is the problem exactly? Can you calculate the shortest distance between two points/locations? – blackapps Mar 08 '22 at 18:20

1 Answers1

1

If you have latitude and longitude values of both start and end locations (I assume you have got), this answer which I have used before works well.

bjorke07
  • 94
  • 1
  • 10