Thursday, May 20, 2010

Re: [android-developers] Throwing an event in an Application, handling it in an Activity

On Mon, May 17, 2010 at 11:14 AM, Leigh <leigh.herbert@gmail.com> wrote:
In other environments, I would achieve this by having the Application cause an Event, and have the activities listen for and handle the event. Is this an option?

Sure. All of your activities have access to the one application (getApplication()), so they can register and unregister themselves with it in onCreate and onDestroy.)

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

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment