Could this 2 minute interval and number of retries (currently 3) be made configurable.GPS back off time: If GPS timeout occurs (no GPS fix within 2 minutes) the GPS will be switched of for 10 seconds. Afterwards it will be enabled again. If again a GPS time occurs the GPS will be switched of again for 10 seconds. After the 3rd try it will disable the GPS not for 10 seconds, but for the value configured here.
I'm trying to optimize battery life. I have GPS 1800, on vistiors 600, backoff 600 (I made backoff equal on visitors so update on visitors functions ok when visitor comes and phone goes from no GPS signal to yes GPS signal)
But battery gots eaten alot cause this actually means GPS will be on for 3*2 = 6 minutes every 10 minutes, so 6 out of 16 minutes which is a lot.
So I have two suggestions:
1. When visitor comes in backoff counter is reset and update is tried immediately (ok maybe a little smarter if visitors keeps coming on and off constantly, but you get the point)
and/or
2. Make GPS timeout (2 minutes) and number of retries configurabile (I'd make it for example 2 tries with 1 minute and would get 2 minutes GPS every 12 minutes which is lot better then 6 every 16).