Page 1 of 1

goelocation complete event

Posted: Wed Sep 12, 2012 5:26 pm
by Emmz

Hello again..
I'm hoping you have an idea on how to deal with gps data.
What I want is to detect if actual gps is enabled on android phone.
I dont think there is an actual setting I can check.

So I'm using java to check for speed == "" && altitude == "" && accurate 100
Figuring gps always gives these values vs. wifi gives no alt, speed, +150 accuracy.

Problem is..
The the gps is intermittent while running. I get good results then after 30 sec or so My success event runs and if there are poor values it fires my no gps alert.
Any Idea how to deal with this??
Thanks as always.

NB. watchPosition set to true.


goelocation complete event

Posted: Wed Sep 12, 2012 6:07 pm
by maxkatz

I'd check if there are any settings you can play with in the PhoneGap's Geolocation component -- how to handle poor values or check their forum for any settings that could help.


goelocation complete event

Posted: Wed Sep 12, 2012 6:16 pm
by Emmz

Ok. I will try that. Thanks.
Right now I'm using a timer with on success event.
ie. if speed == "" && altitude == "" && accurate 100
delay 3sec. then call another check again function with the same condition arguments.

Its probably not the best solution but does seem to work...