title: Android Service did not stop
body: <p>I have a main class with two buttons to start and stop the service.</p>
  
  <pre><code>public void onClick(View src) {
      switch (src.getId()) {
      case R.id.buttonStart:
          Log.d(TAG, "onClick: starting srvice");
          myService = new Intent(this, MyService.class);
          startService(myService);
          break;
      case R.id.buttonStop:
          Log.d(TAG, "onClick: stopping srvice");
          stopService(myService);
          break;
      }
  }
  </code></pre>
  
  <p>Start Service intended to send current GPS coordinates to the server. it starts perfectely but did not stop on button click.</p>
  
  <p>In MYService.java i have this code onDestroy method.</p>
  
  <pre><code>public void onDestroy() {
      Toast.makeText(this, "My Service Stopped", Toast.LENGTH_LONG).show();
      Log.d(TAG, "onDestroy");
  }
  </code></pre>
  
  <p>Please help how to kill this Service.</p>