>From GPS, I am trying to get latitude longitude, bearing and speed.
Just a one time snapshot.

My code is here:
http://code.google.com/p/speedlimit/source/browse/#svn/trunk/Speedlimit/src/org/speedlimit

Pblm:
The "loc" is always 0.

Q: Must I initialize the GPS provider somehow??
Any complete code snippet most welcomed...


-----excerpt from Speedlimit.java---

         Gps gps = new Gps();
         gps.doit();

------Gps.java--------------------------------

package org.speedlimit;

import android.app.Activity;
import android.location.Location;

public class Gps extends Activity
{
   private Location loc;

    public void doit() {

        if (loc != null) {
                double lat= loc.getLatitude();
                double lon= loc.getLongitude();
        }
    }
}
--------------------------------------

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to