Reputation: 99
I need to implement a system which requires user devices to continuously send me GPS updates.This can be really heavy on battery and data plans. Is there a model developed by android that takes care of such requirements?
Is it wise to switch on and off GPS while the app is running.
I am looking for a optimized model for this task.
Upvotes: 0
Views: 434
Reputation: 11272
This depends on the needed update interval. If the GPS is switched on, the time to get an exact fix depends on how much satelite it sees (eg. amount of visible free sky) and how long it was off.
So if you for example need one fix in ten minutes, it is ok to switch the GPS off and on. It would get a fix quite fast, but depending on the sky visibility, eg. may take a longer time (usually between some seconds and about a minute in worst case if a fix is possible) to get an accurate fix. On the other hand, if you need an update every minute, switching would not be useful in most cases (city driving for example) as the fix would already take an larger amount of the minute.
When switching the GPS, it is of great benefit of having a good sky visibility, eg. to instruct the users to not put the device deep inside the car or inside one's pocket but better mount it to the windscreen or hold it in front of the body for example. Then you can get fast fixing and shhort on-periods.
Upvotes: 2