Shouldn't it suffice to just re-register the listener onCreate()?

My setter looks like
public void Listener(Listener listener){
    theListener = listener;
}

Btw, the Activity is a singleton
( android:launchMode="singleInstance") so there's only one instance.

Thanks

On Mar 13, 1:08 pm, Mark Murphy <[email protected]> wrote:
> AuxOne wrote:
> > When the application is first run the Listener works fine. When I use
> > the "home" button to minimize it, then open it again it's still fine.
>
> > But when I press the back button then run it again from the
> > application icon, the Listener doesn't work fully. The code runs and
> > the Listening methods are called as usual but none of the UI elements
> > that are listening update. It requires a restart of the phone to get
> > the listener working again after this point.
>
> My guess is that you still have a listener from the first instance of
> your activity registered. Please unregister all listeners in or before
> onDestroy() and register them anew in onCreate() or some similar spot.
>
> > Is there a way to use the
> > onDestroy() or similar method to call a function that actually closes
> > the application?
>
> No.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books

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