On Sat, May 19, 2012 at 11:45 AM, Bill Michaelson
<[email protected]> wrote:
> For one, would the notification icon remain?

Only between your calls to startForeground() and when the service goes away.

> Also, would it be
> advantageous in the event that my Service is in a period of short
> duration pauses such as 5 seconds?

Probably not.

> From the opposite perspective, is
> there any serious negative consequence to leaving a Service running
> during phone sleep and simply goosing it with an alarm as I'm
> proposing?

Your architecture appears to assume that the service will stay
running, unless gracefully shut down by the user using your UI. Please
bear in mind that, due to past developer transgressions, a significant
cohort of users will attack your service with task killers, Force Stop
from Settings, etc. How well your service behaves is of secondary
importance (though a poorly written service will escalate such
attacks) -- you will be blamed just for having a long-running service,
because other developers with other long-running services have behaved
badly. By having a clear path for users to get rid of your service,
you reduce the odds of users killing you, but for a sufficiently
popular app, some percentage will still do it.

An architecture that does not assume that it needs to run continuously
(e.g., does polling via AlarmManager) will be more resilient in the
face of such user behavior.

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

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.6
Available!

-- 
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