I have a Service in which the onTaskRemoved()
method has been implemented.
When the service is started with startService()
the function o
A service can be bound or started or both. It depends on how you implement onStartCommand
and onBind
say the docs.
http://developer.android.com/guide/components/services.html
But if you want your service to do both stay around and talk with clients over an IBinder then simply start the service and then bind to it.
startService(new Intent(context, CustomerService.class));
// Bind to the service
bindService(new Intent(context, CustomerService.class),
mConnection, Context.BIND_AUTO_CREATE);