On my phone, Android would sometimes kill the GPS logging service
(GeoService) after a while, to free up system resources.
Typically, this happened after about 15 minutes of using the phone for
other things, or after about 30 minutes of doing nothing on the phone...
Question 1) Did anyone else notice this behavior ? If bet if you use the
latest released version, it will stop logging after a while... can anyone
verify this problem ?
It happened to me on a Nexus One ("HTC Passion"), with the lastest stock
I have a patch ready to improve the situation by adding an Android Alarm
timer that gets called every 15 minutes and restarts starts the service if
it has been killed.
This Alarm timer is enabled when the service is started and disabled when
the service is stopped.
This solution might not be perfect, but it's a big improvement over the
current version which gets killed and need a manual restart every so
often... an alarm every 15 minutes has little overhead and it fixes the
problem at hand. Stronger yet, if I'm not mistaking, any service on Android
can get killed if the Android system deems it necessary, for example when
there hasn't been any user interaction for a long time with the Activity
that's bound to the service. So there might not be a better solution after
I'm planning to commit this change, but thought I would announce it
beforehand, to get any pre-commit feedback.
If anyone wants me to, I can make the change more configurable (with
configurable alarm timeout instead of a fixed 15 minutes period, or by
allowing the user to enable/disable this Alarm behavior) but I would like
to keep this first commit small and add more features when they seem
Question 2) Any feedback or ideas on this ?
If you want, I'll send a patch to the mailing list but since there are only
a few developers, I would like to go skip all this overhead and commit it
Get latest updates about Open Source Projects, Conferences and News.