You need to keep that state in the service, and have the Activity be a
viewer of the state.

On Wed, Dec 17, 2008 at 11:44 AM, Al <[email protected]> wrote:

>
> Usually I wouldn't mind if the Activity is stopped and no more updates
> can be sent, but in this case (IRC app), I always need to keep the
> channel info up to date, even when the app isn't in focus, so
> suspending the thread is not an option. Also, for events like private
> messages and highlights, I need to know so I can show the info in the
> Notification bar and then the user can bring the app into focus and
> reply or whatever.
>
> On Dec 17, 7:30 pm, Michael <[email protected]> wrote:
> > I have an app that uses a background thread to fetch data, then posts
> > messages/runnables to keep the UI up to date.  When the UI is not
> > visible, this thread is suspended.
> >
> > Pretty much, onCreate/onResume/etc for the Activity starts the
> > background process if it's not running.
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

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