I've been playing around with the 8800 for a couple of days now and am having issues with getting a valid GPS position. Currently, I just made a LocationListener class which I setup with my LocationProvider object to run every 60 seconds. The psuedocode for what happens in the locationUpdated function of my class is as follows (based on gpsdemo):
// initialised at start up
LocationProvider _locationProvider = LocationProvider.getInstance(null);
_locationProvider.setLocationListener(new LocationListenerImpl(), 60, 1, 1);
// this is the class
private class LocationListenerImpl implements LocationListener
public void locationUpdated(LocationProvider provider, Location location)
// get lat, lon, etc.
// Make data into string
// Make own data string to indicate no fix was received
// Send data string to HTTP site as a GET request
Everything there works, so I haven't got caught up on detail. The problem is that the location.isValid() returns false about 50% of the time. I've got the BB outside on the dash of my car now, screen facing the sky, and I'm getting real data about 25% of the time. Changing the frequency locationUpdate runs to 120 seconds didn't fix anything.
Does anyone have any idea why I can never get a fix? Even if I stand in an open area holding the device in my hand? Should I kill the LocationListener instance each time I am done and use something else for my timing? Should I use the Criteria class instead?
Any help would be greatly appreciated.