Thanks, I think I got everything I need from http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/app/LocalServiceBinding.html and http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/app/LocalService.html
The approach of creating a Binder to pass the service instance through to the binding activity is easily missed and might deserve some more pointing out in comments and the surrounding documentation. I would imagine that using an activity plus a tightly coupled local service in such a way to create an application which looks to the user like an activity which can be put into the background would be a pretty common usage pattern. Bernhard On Nov 4, 3:24 pm, hackbod <[EMAIL PROTECTED]> wrote: > And take a look a the service API demos, which show both the full > remote service case, and the simpler local service case. > > On Nov 4, 10:01 am, Jean-Baptiste Queru <[EMAIL PROTECTED]> wrote: > > > You're looking for a service. Unless you have a good reason not to do > > so, you should put it in the same process. > > > JBQ > > > On Tue, Nov 4, 2008 at 9:50 AM, brs <[EMAIL PROTECTED]> wrote: > > > > What is the simplest, correct way to implement an application with > > > background semantics similar to the media player? To the user it > > > should appear as an activity which can be kept running in the > > > background and "iconized" to the notification bar whenever the > > > activity is not on top of the stack or until stopped explicitly. > > > > I guess some of the choices would be: > > > > a) An activity which ignores onPause/onStop and just keeps doing > > > whatever it is doing (simple, but I suspect not the recommended > > > way...) > > > b) Activity + in-process service > > > c) Activity + service with its own process > > > > Assuming the solution involves a service, what are the choices for > > > sharing a fair amount of state between the activity and its service? > > > Can they just access shared objects (how to set that up) or does it > > > require an AIDL RPC interface storing everything in a database > > > instead? > > > > Bernhard > > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---