android - GPS update interval is faster with good signal? -


i'm trying limit program take location updates every 10 seconds instead of constant updates in order reduce battery drain. works fine when i'm debugging indoors , signal weak (i.e. gps icon flashes), if phone gets proper fix (i.e. gps icon static) update interval increases second.

i know code mlocationmanager.requestlocationupdates(locationmanager.gps_provider, updateinterval*1000, 0, this); not force gps take updates @ given interval, in opinion shouldn't depend on strength of signal , fluctuate much.

any ideas?

update: see comment

i suspect gps radio works in manner either it's connected gps satellites or it's not. when it's connected, android sdk sends updates they're available gps hardware. when doesn't have full gps connection falls sending agps updates according you've requested.

if want updates every 10 seconds, should save last received location's time value in listener, , when receive new location check time against old value; ignore if it's frequent (or smarter checking accuracy , replacing old value, etc).


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -