On Tue, Nov 9, 2010 at 6:52 PM, Federico Paolinelli <[email protected]> wrote: > And a more general question: is the bind mechanism suitable for one > shot services, or it just make sense for persistent services?
To me, that is a bit like asking if a wheel is suitable for bananas, or does it just make sense for apples. :-) Bind if: -- You are going to be around for the duration of the operation -- The service needs to be around -- You need a rich API For example, if you have a Service that is providing a local API around a synchronous Web service, binding is a fine solution. > What happens if I call the startService method but the service is > already active? Will it start another service, or will it call the > onStartCommand of the same service? The latter. There cannot be more than one copy of a service running at a time. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] 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

