On Tue, Sep 4, 2012 at 12:13 PM, NANI <harinaik.n...@gmail.com> wrote:

> dont send any messages plzz
>

WTF?

On Tue, Sep 4, 2012 at 12:19 PM, roemer <roman.schoenbich...@gmail.com>wrote:

> the service doesn't even know if there is a ui... or if there are more
> uis... or what ever the ui is... and of course the ui doesn't maintain the
> state, because the ui maybe doesn't even know all states the service is
> in... but how would the user know what state the service is in...
>
> so thats the problem..
>
> lets say, i pass the service a workload by pressing a button, and
> depending on the button, i change the background color...
> but actually, the service doesn't care about this, the color feedback is
> just for the user... once started, the service does his job
>

This is what I'm saying - you'd have some business object whose
responsibility it is to maintain this state.
You press that button and it sets some variable or something on this
object. When your Activity comes up, it queries this object for the current
state of things and sets up the UI accordingly.

On Tue, Sep 4, 2012 at 12:23 PM, roemer <roman.schoenbich...@gmail.com>wrote:

> and during the service is working.. it just fires out some updates to who
> ever is listening... i've done this... i've completed that....
>
> and according to that, the ui can change further on, in what ever way it
> wants
>

And if no one is listening? (Like the user has closed the Activity showing
the state of things?) This is why you need to maintain that state somewhere
else where you can retrieve it if and when the user closes the Activity and
later comes back to it.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

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

Reply via email to