You may want to try the Messaging Design Pattern (MDP) or the Command Design Pattern. MDP provides improvements in terms of coupling, encapsulation and reusability.
Messaging Design Pattern (MDP) and pattern implementation - Published in the 17th conference on Pattern Languages of Programs (PLoP 2010). https://jt.dev.java.net/files/documents/5553/150311/designPatterns.pdf The Jt design pattern framework provides implementations for both of these patterns: Jt Design Pattern framework http://www.ibm.com/developerworks/webservices/library/ws-designpattern/index.html I hope this helps. On Nov 2, 3:21 pm, jotobjects <jotobje...@gmail.com> wrote: > Further even the Service constructor is called asynchronously. > > It looks like all operations on a Local Service have to go through the > ServiceConnection, or at least operations on the service have to be > deferred until after onServiceConnected has been called. Is that > correct? > > Any other pointers about the correctdesignpatternto use for a > LocalService? > > On Nov 2, 11:54 am, jotobjects <jotobje...@gmail.com> wrote: > > > I have tried both startService() and bindService(). Both methods > > return before Service.onCreate() is called. So work I was expecting > > to complete in Service.onCreate() is not done. > > > Is it necessary to do initialization steps in the Service > > constructor? If so what use is the Service.onCreate method? Any > > suggestions about how others handle this problem? > > > I found this thread which describes the problem, but the poster's > > solution is not described. > > >http://groups.google.com/group/android-developers/browse_thread/threa... -- 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