android kotlin calculate the distance between two locations

www.‮al‬utturi.com
android kotlin calculate the distance between two locations

kotlin android get distance between two locations

Location startPoint=new Location("locationA");
startPoint.setLatitude(23.81721);
startPoint.setLongitude(51.32351);

Location endPoint=new Location("locationA");
endPoint.setLatitude(15.81721);
endPoint.setLongitude(26.98108);

double distance=startPoint.distanceTo(endPoint);
Created Time:2017-08-30 20:41:35  Author:lautturi