Thursday, June 10, 2010

Re: [android-developers] Re: Handling events from one service for multiple activities

takyon wrote:
> If I can't do this then what is the right way for multiple activities
> in an application to get event notifications from a service.

Have them bind to the service and provide callback objects.

Or, have your TabActivity bind to the service, provide a single callback
object, and dispatch events to the appropriate tab.

There are other patterns as well, but I'd start with those.

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 2.0 Available!

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate