I wrote a little app to just display GPS information and this is what I did:
LocationManager locationManager = (LocationManager)getSystemService(LOCATION_SERVICE); locationManager.requestLocationUpdates(locationManager.GPS_PROVIDER, 500l, 10l,this); "this" being my Activity that implements LocationListner where this bit of code lives in the onCreate method. The permissions are android.permission.ACCESS_COARSE_LOCATION android.permission.ACCESS_FINE_LOCATION although I would think I'd just need ACCESS_FINE_LOCATION for GPS coordinates. Nick On Oct 21, 4:18 pm, Greg <[EMAIL PROTECTED]> wrote: > Hi all, > > New to the groups and to android (about a month into it). I developed > an app on the emulator using the "gps" location provider and > everything was working great via the gps emulator. > > I just got my G1 phone yesterday and was able to get the app installed > successfully. However, when I fired it up it was getting coordinates > from all over the place that made no sense. I was travelling about > 300 mph just sitting in my backyard :) > > I put an activity out to list the available locationproviders from the > location manager and got these two: > > provider 0 "network" with a class of > android.location.DummyLocationProvider > provider 1 "gps" with a class of > android.location.DummyLocationProvider > > It looks clear to me that even on the actual phone, I'm only seeing > fake providers. > > All of the samples I could find to this point talk about just using > the "gps" provider by name, but that apparently isn't going to work on > the real device. I noticed when I used Google Maps, upon startup a > satellite dish icon showed up in the status bar with a signal strength > for the GPS. When Maps was shut down that icon went away. Apparently > maps is using a different "real" provider that I can't see through the > location manager. > > A bit long winded, but hopefully this is all clear. I'm looking for > any guidance on how a real application on a real device should > properly locate the right GPS provider for getting location > information from. Am I missing permissions that prevent me from > seeing the real providers? > > Thanks for any assistance! > > Greg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" 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-developers?hl=en -~----------~----~----~----~------~----~------~--~---

