On Wed, Jul 20, 2011 at 5:38 PM, darrinps <darri...@gmail.com> wrote: >> > I don't see any way to register for a callback which was what I was hoping >> > for. >> >> That's pretty much the point of the LocalService example ... your activity >> has a reference to the Service and can do what it wants with it, including >> registering a custom callback that the Service invokes when it's done. > > I understand the reference, but I don't see any where in the example > where any custom callback is done, and I don't see anything clear in > the API on how to do that.
The LocalService sample uses the binding pattern. In the binding pattern, you supply a Binder implementation, with your own custom API. If you want that Binder to accept some sort of listener as a parameter, you can implement that yourself. If you want your Service to call that listener when an event occurs, you can implement that yourself. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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