[android-developers] Re: How to manage service lifecycle when device kills it due to low memory

2009-08-26 Thread cnordvik
Thanks for a very detailed and informative response! It's a polling alert for football/soccer matches (FotMob actually), so maybe it is important after all :-) As a user I want to know what is running in the background and polling frequently but I have noted that Scoreboard and other apps

[android-developers] Re: How to manage service lifecycle when device kills it due to low memory

2009-08-26 Thread Dianne Hackborn
You really should be using an alarm to start your service and then stop it when done. If you are polling often enough (like less than every 5 minute or so) that this doesn't make sense, then you are going to kill the user's battery. On Wed, Aug 26, 2009 at 2:10 AM, cnordvik cnord...@gmail.com

[android-developers] Re: How to manage service lifecycle when device kills it due to low memory

2009-08-25 Thread Dianne Hackborn
Not getting onDestroy() is normal, expected, and desired behavior as for all app components -- the kernel kills processes when it needs more memory, we don't rely on them being nice and cleaning up at their leisure. The current semantics for recovering from being killed are unfortunately as you