I am confused about Service lifecycle.
I have many questions following:
If my app calls
startService()
multiple times to a Service, will there be multiple Services running simultaneously? Or only one?As 1st, if I call
bindService()
multiple times to a Service in my app, what will happen to my app?Assume that I have a Service that has been started via
startService()
, and then later I bind it in order to instruct it to do something. in this case, if I instruct (via this Binder interface) the Service to execute itsstopSelf()
method, does the running Service stop immediately?Assume again that I have a Service that can be started only by
bindService()
, and theonUnbind
is overridden to return true, in this case, should I callstopSelf
method explicitly to shutdown the Service?