Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Hmmm... I read more about startForeground, and it seems that this just sets a flag on a notification object, rather than actually taking some action. So on a whim, I reversed the sequence so that now startForeground precedes NotificationManager.notify. So far, it's looking pretty good. So now I'm searching for that example that led me to do it the other way...
    – Dennis
    Commented Jul 9, 2011 at 0:19
  • Sadly, the success of reversing that sequence was short-lived. Seems to be a bit of a gamble as to whether the sticky will "stick." With many dozens of attempts at starting this service, I have had it remain started three times so far. :(
    – Dennis
    Commented Jul 9, 2011 at 1:02
  • Well, was your Galaxy Tab experiencing low-memory conditions, or perhaps your Service was doing something memory intensive on the main thread? Commented Mar 2, 2015 at 21:48