Mariano Kamp wrote:
> 
>     Quoting myself:
> 
> And you have done so wonderfully.
> 
> What is it your trying to say though? 
> 
> That it is ok to raise the priority when I don't want my process to be
> killed.

I'm saying what Ms. Hackborn confirmed in her reply to my post --
startForeground() elevates the service's process to the foreground
priority class. The not-too-unreasonable assumption the SDK makes is
that something that is supposed to be in the foreground is supposed to
be in the foreground. I mean, "foreground" is in the method's name.
There's no question the documentation could be stronger, though.

That being said, your choices are:

1. Continue using startForeground() and either live with the complaints
or modify your service to be less CPU-intensive, or

2. Stop using startForeground() and modify your architecture to better
support the service being shut down

Since Android applications have to support their services being shut
down (via task killers, the Services screen in Settings, etc.), I would
think #2 would be the better answer, but that's your call.

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

Android Training in NYC: 4-6 June 2010: http://guruloft.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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to