title: Stop or kill a service
body: <p>I am developing a task manager application..</p>
  
  <p>In that app, I display to the user a list of running apps and kill button beside each app.
  When user presses kill button the corresponding activity will be killed and i used                       </p>
  
  <pre><code>      activitymanager.killbackgroundprocesses(packageName)
  </code></pre>
  
  <p>I created another application called service notification where user can start and stop a service by clicking on button "start service" and button "stop service" respectively..     Then before running my task manager app, i started the service from service notification app.
  So this activity was displayed in my task manager app.</p>
  
  <p>But when i kill that activity, it disappears from the list and then appears again because the service is restarting..How do I kill the sevice then?</p>
  
  <p>I used startService and onCreate for starting service and showing some notification and stopService and onDestroy for stopping service...</p>