On Fri, Jun 18, 2010 at 3:34 PM, Mark Murphy <[email protected]> wrote:
>
> Well, Android could kill anything "mid-stream" by terminating your
> process, if it needs to reclaim memory. However, if your service is
> brand new (e.g., had been previously destroyed in your last poll
> cycle), that is unlikely.
>
> However, the device might fall asleep before onHandleIntent() gets
> invoked. Take a look at WakefulIntentService for some code to work
> around this:
>
> http://github.com/commonsguy/cwac-wakeful

I actually need to submit you a bug on that. I had an underlocked
error thrown from the wakeful intent service in the finally block.
java.lang.RuntimeException: WakeLock under-locked
But looking at the WakefulIntentService, this shouldn't be able to
happen. I'm thinking this is possibly related to my problem.

I actually don't mind if it sleeps between, as it SHOULD run on the
next wakeup. Since I'm using single shot alarms, this is OK to happen,
since the service will just continue running on next wakeup. My
service is only interested in elapsed wake time, wall clock is
irrelevant.

I have the entrance and exit logging setup. There is no way out of the
service without a finally block logging the exit.

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

Reply via email to