Read the hints regarding "Location-based Service APIs":
http://code.google.com/android/toolbox/apis/lbs.html

Some sample code from my app (there are much more samples around here
or at the android developers list):

LocationManager lm = (LocationManager)
getSystemService(LOCATION_SERVICE);
/*
* just an empty class that implements a location listener
* important for the LocationManager to notice if your location has
changed
*/
myGPSListener = new GPSListener();
lm.requestLocationUpdates("gps", 0, 0, myGPSListener);
Location tmpLoc = lm.getLastKnownLocation("gps");

You have to set your location using "geo fix ..." (telnet) or DDMS and
then you can access this location with the code above. To show a map,
you'll need a class which extends MapActivity.
--~--~---------~--~----~------------~-------~--~----~
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