I am working on an augmented reality-type application. I noticed an issue with GPS not updating as expected. I have put a counter on-screen so that I can keep track of how often onLocationChanged is being called.
The GPS receives lock ok, and begins calling onLocationChanged. After some time (less than a minute) onLocationChanged will stop being called, and the GPS location is no longer being updated. This happens whether we are standing stationary or driving in a car. We can usually get the GPS to continue updating if we set the phone down on a surface with the camera sensor down (so the screen shows nothing but black). After that it will continue to update for some time before again stopping. We've produced two more applications to help debug this issue. One is this application: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/CameraPreview.html modified to work with Android 2.2. We've added a LocationListener and an on-screen onLocationChanged counter and nothing else. This application functions the same way as the augmented reality application, with intermittent stoppages in GPS updates. The other application is just a location listener and an on-screen counter, without using the camera. That application works perfectly fine. The location listener never stops updating, and functions exactly as we'd expect. We've tried requesting location updates with different time and distance parameters, but they don't seem to affect functionality. We've used two different HTC Inspire 4G phones to test this, and both function the same way. We've also tested on a Motorola Droid 2 that did not seem to have the same issue, although we were not able to test as thoroughly on the Droid 2. The HTC Inspires are running the stock HTC Android 2.2.1 OS. Any ideas? Is there any reason the GPS would work better when the camera sensor is covered and not letting any light in? That's the variable that seems to affect functionality the most (although it's not completely consistent). I've found a few threads that mention an issue with using GPS and the camera simultaneously, but all have been open-ended, unanswered questions. Thanks! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en