Hi All,
New to the forum and Android programming. Been playing with it for a month or so now and it's really great. I got my G1 in yesterday (2 days before it was supposed to arrive, woohoo!) and, of course, decided to try my app out on it.
I am doing some things with current location tracking and had it all working great in the emulator based on code I found here and elsewhere by using the 'gps' location provider.
However, on the real G1, the app seems to continue to use a mock location provider. I created an activity to just view the providers that are available via LocationManager.getProviders and I see two entries:
1. 'network' with a class of android.location.DummyLocationProvider
2. 'gps' with a class of android.location.DummyLocationProvider
I also noticed when I installed my app it had a double list of permissions. The first part says
Allow this application to:
Network communication - full Internet access
Your location - coarse (network-based) location, fine (GPS) location
Then under that an expandable list that when expanded says:
Your location - mock location sources for testing
I believe the mock part shows because I do have ACCESS_MOCK_LOCATION permission in my manifest.
In any case, when I run the app on the phone and do my GPS stuff it is definitely using some type of dummy position generator. It appears to be somewhat random positions near my location (about 10 miles away).
I cannot figure out and haven't found anything here or by googling that shows the proper way to interrogate the provider system to find the right provider. One thing I've noticed on the actual phone is that when I fire up Google Maps, a little satellite dish icon shows in the status bar as if Maps is turning on and firing up the real GPS provider. When Maps closes, it disappears.
This is a bit long-winded but my basic question is: What needs to change in code that is obtaining a locationprovider to get the real GPS provider and start/stop it as necessary for use within the app?
Thanks!
Greg


