Android examples for java.lang:Math Trigonometric Function
get Distance using Location.distance Between method
//package com.java2s; import android.location.Location; public class Main { public static double getDistance(double startLongitude, double startLatitude, double endLongitude, double endLatitude) { float[] results = new float[3]; Location.distanceBetween(startLatitude, startLongitude, endLatitude, endLongitude, results); return results[0]; }//from w w w . java 2 s.com }