[android-developers] Re: Strange Bug in GPS!

2009-08-09 Thread JP
I've found that on the emulator as well... Didn't try to chase it down however and instead switched to an actual device. In order to test GPS coordinates in another hemisphere, I introduce temporary test code that moves the coordinates over and down. On Aug 9, 1:50 pm, Sharmila wrote: > Hi, > I

[android-developers] Re: Strange Bug in GPS!

2009-08-13 Thread dkolegayev
Ran into the same problem. This hack (http://code.google.com/p/android/ issues/detail?id=2545#c19) fixes the problem in emulator but I was hoping to find a better solution than removing/adding listener on every location update. On Aug 9, 10:49 pm, JP wrote: > I've found that on the emulator as

[android-developers] Re: Strange bug in GPS fix - please help!

2009-07-16 Thread Mark Murphy
Anna PS wrote: > Basically my question is this - does the fact that I'm running a > background thread somehow make the accuracy worse? Or is the problem > in my code, something to do with the way that I'm polling the GPS > data? I cannot say for certain whether your background thread is causing y

[android-developers] Re: Strange bug in GPS fix - please help!

2009-07-16 Thread Anna PS
PS just to clarify point 2: the GPS location listener is running in the background while the user is waiting, so it's getting a fix *before* the user clicks on the report button. The question is why this fix is so much better than the fix over the same period when the background thread is running

[android-developers] Re: Strange bug in GPS fix - please help!

2009-07-16 Thread Anna PS
Thanks Mark. When you say "using the LocationListener", what exactly do you mean? Is there a way that I can poll the listener directly - I know that there is an onLocationChanged event, but does that help me? Basically what I want is something that, when the user clicks the report button, (i) ge

[android-developers] Re: Strange bug in GPS fix - please help!

2009-07-16 Thread Anna PS
Sorry, I guess I'm being dim. Should I add some code inside the onLocationChanged method itself to check the accuracy? And then just check this number when the user clicks on the button? public void onLocationChanged(Location location) { accuracy = location.getAccuracy();

[android-developers] Re: Strange bug in GPS fix - please help!

2009-07-16 Thread Mark Murphy
Anna PS wrote: > Sorry, I guess I'm being dim. Should I add some code inside the > onLocationChanged method itself to check the accuracy? And then just > check this number when the user clicks on the button? > > public void onLocationChanged(Location location) { >accuracy = location.getAccura

[android-developers] Re: Strange bug in GPS fix - please help!

2009-07-20 Thread Anna PS
Thank you Mark! That solved the problem - thanks for the swift and helpful response, as ever. Do you think it is a bug that getLastKnownLocation tends to choke and fail if called from a background thread - is it something that I should reproduce and report to Google? Or is it something that I s

[android-developers] Re: Strange bug in GPS fix - please help!

2009-07-20 Thread Mark Murphy
Anna PS wrote: > Do you think it is a bug that getLastKnownLocation tends to choke and > fail if called from a background thread - is it something that I > should reproduce and report to Google? I'm not sure. I *think* I've used getLastKnownLocation() in background threads, but I don't have a rea