This is a fairly broad question, so I will answer as best as possible. From what I know about services, several actions can connect one service, all of which have access to it. Only after all actions related to the service end with their connections (by decoupling), does the service really stop.
The Android services documentation for services tells us:
... the system will keep the service running as long as it is running or there is one or more connections to it using the Context.BIND_AUTO_CREATE flag. When none of these situations occurs, the onDestroy () method is called and the service is terminated
, , , . IBinder, . , Android :
IBinder , helpl.
, Messenger AIDL. .
, !