Thank you for your input. I have tried using it but it seems to be more challenging than expected.
I am importíng android.location.location and then trying the line float results [] = distanceBetween(lat_a1, lng_a1, lat_b1, lng_b1); where lat_a1, lng_a1, lat_b1 and lng_b1 have all been converted to double (I am using them as float earlier in my program). The values of lat_a1 and lat_b1 equals the GPS coordinates read using location.getLatitude(); and location.getLongitude(); My problem is that I get the error message: "The method distanceBetween(double, double, double, double) is undefined for the type new LocationListener(){}" and I don't know how to interprete it. Furthermore, I will be very thankful is you can help me by reading the time, and timedifference between a number of readings, as I need the timedifference to estimate an average speed over a distance travelled. Thank you for your help ckloch I understand all the input parameters, but what about the output "float results[]" Does it mean that I can write the line distanceBetween(double startLatitude, double startLongitude, double endLatitude, double endLongitude, float[] results); Does it mean that if I enter the command On 20 Maj, 20:13, TreKing <treking...@gmail.com> wrote: > On Thu, May 20, 2010 at 6:21 AM, ckloch <htc.kl...@hotmail.com> wrote: > > Please, let me know how I can solve this problem. I believe that there must > > be easier way to calculate this distance, but I have found any. > > Try > this:http://developer.android.com/intl/fr/reference/android/location/Locat..., > double, double, double, float[]) > > ------------------------------------------------------------------------------------------------- > TreKing - Chicago transit tracking app for Android-powered > deviceshttp://sites.google.com/site/rezmobileapps/treking > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > > NEW! Try asking and tagging your question on Stack Overflow > athttp://stackoverflow.com/questions/tagged/android > > To unsubscribe from this group, send email to > android-beginners+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en