i try to get distance between two Positions and tried the following code:
Location startPoint=new Location("locationA");
startPoint.setLatitude(17.372102);
startPoint.setLongitude(78.484196);
Location endPoint=new Location("locationA");
endPoint.setLatitude(17.375775);
endPoint.setLongitude(78.469218);
double distance= (int) startPoint.distanceTo(endPoint);
TextView dis = (TextView) findViewById(R.id.distance);
dis.setText((int) distance);
unfortunately my app is crashing always if i try to calculate the distance between this two points