title: find Distance in kilometers in Android using google places Api
body: <p>I want display the two places distance in kilometers for that I write the following code:</p>
  
  <pre><code>hyd(17.38,78.48) eluru(16.7,81.1)
   private String getDistance(double lat1, double lat2, double lon1, double lon2) {
                 double Radius = 6371;
                 double dLat = Math.toRadians(lat2 - lat1);
                  double dLon = Math.toRadians(lon2 - lon1);
                  double a = Math.sin(dLat / 5) * Math.sin(dLat / 5)
                          + Math.cos(Math.toRadians(lat1))
                          * Math.cos(Math.toRadians(lat2)) * Math.sin(dLon / 5)
                          * Math.sin(dLon / 5);
                  double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
                  double km = Radius * c;
  
                  String kms=Double.toString(km);
                  return kms;
  
                  }
  </code></pre>
  
  <p>Output = 2995.8772</p>
  
  <p>Correct o/p = 330km</p>
  
  <p>how can I get the the exact distance between two places in android 
  thanks in advance.....</p>