Hunter Peress wrote:
> I too have a Service. It performs a task, and when finished, it
> releases the wake-lock. There is a place to stop the service from
> doing its work, and at this point I too release the wake-lock. So from
> my perspective, I cleanly release the wakelock at all possible exit
> points from my service.

If you think your service will live forever, then you have missed an
exit point.

> I don't see a benefit of your wakeful intent service.

If you are looking to wake up the device and have a service perform some
work (and then go away, like services should do), WakefulIntentService
is a fine implementation of that pattern.

> If I'm cleanly releasing the wakelock every time the service is
> finished with its work....then where is wakelock exception being
> thrown... from research, it would seem as if the service is killed
> randomly, dirtily.

Services cannot live forever.

http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-are-not

To the "where is wakelock exception being thrown" implied question,
check the Java stack trace.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training in US: 14-18 June 2010: http://bignerdranch.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to