I am trying to produce a mock location provider by using an example
kml file grabbed from somewhere (where I cannot remember now). Anyway
I think I also need a properties file but I'm not sure where this goes
and what it is called.
The code I am using is -
locationManager = (LocationManager)getSystemService
(Context.LOCATION_SERVICE);
Location location = locationManager.getLastKnownLocation("gps");
double lat = location.getLatitude();
double lng = location.getLongitude();
It seems that I am not getting anything back from the kml file, but as
a beginner to Android and Java I am struggling to debug the problem. I
am using eclipse Ganymede.
What I need really is some pointers on the following:
1. How do I debug so that I can see the values of Location.getLatitude
() and location.getLongitude(); ?
2. I am referencing "gps" as my provider and have a kml file located
at C:\Program Files\android-sdk-windows-1.6_r1\tools\data\misc\location
\gps . Is this correct?
3. How do I create the properties file?
4. Any other advice would be greatly appreciated.
I have scoured the net for answers but nothing seems to fit what I am
after. I have also tried to go to URL
http://code.google.com/android/toolbox/apis/lbs.html
but it redirects me to http://developer.android.com/guide/index.html
Thanks in advance,
--
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