[android-developers] Re: Why doesn't Context.bindService() call onStartCommand()?

2010-10-25 Thread doug
Thanks for your answers. But they are not convincing. Context.bindService() has the option of creating a new service if the service is not created in the first place. The life-cycle events for a brand new service should be identical. But the SDK doc disagrees and says this about

[android-developers] Re: Why doesn't Context.bindService() call onStartCommand()?

2010-10-25 Thread Bret Foreman
Doug, If the service is not running, I don't see how you can bind to it. So the binding method has two choices if the service isn't already runing - start the service or throw an exception. -- You received this message because you are subscribed to the Google Groups Android Developers group. To

Re: [android-developers] Re: Why doesn't Context.bindService() call onStartCommand()?

2010-10-25 Thread Dianne Hackborn
Service.onStartCommand() is directly tied to startService(). You call startService(). That sends the Intent to the service as a command. The service receives it in onStartCommand(). It executes the intent. That is one way to use a Service. Service.bindService() is directly tied to