title: Android service that was running when the phone was shut down starts automatically when the phone is booted
body: <p>I am currently developing an Android telephony application that includes a service to handle all the SIP signaling for making and receiving calls. </p>
  
  <p>I want this service to start exclusively when the user has correctly logged into the application. However, I am observing an undesired behavior: if the device is shut down while the app is running, the service is automatically started after the phone boots. This does not happen if the application is closed at the moment of shutting down the phone.</p>
  
  <p>I have been reading about it but no answer comes up. Could anybody explain why this happens and how to prevent it?</p>
  
  <p>Thank you in advance.</p>