title: Android Service is recreated after destroying activity
body: <p>First of all I'm creating app that must be working in the background (even if user killed application). I have bluetooth server (raspberry pi) and my app should act like a client to that server. When connection is established I need to keep it alive and disconnect only if user is too far prom server or server sends specific disconnection command. So I simply found BluetoothChatExample and put all the code from activity to service (because I need to communicate even if user kills application and my service should be independent from my main activity). </p>
  
  <p>Here's some code snippets from my service</p>
  
  <pre><code>public class BluetoothCommunicationService extends Service {
      public BluetoothCommunicationService() {
  
      }
  
      @Override
      public void onCreate() {
         super.onCreate();
  
     //....
     //....
     //....
      }
  
      @Override
      public int onStartCommand(Intent intent, int flags, int startId) {
         if(intent.getAction.equals("stop") {
             stopSelf();
         }
         return START_STICKY;
      }
  
  private class AcceptThread extends Thread {
              //....
  }
  
  private class ConnectThread extends Thread {
      //....
  }
  
  private class ConnectedThread extends Thread {
      //....
  }
  
  @Override
      public void onDestroy() {
          super.onDestroy();
  
  }
  </code></pre>
  
  <p>}
  So as you can see I started my service as <code>START_STICKY</code> but here's the problem when I'm killing the application from the "recently used apps" list I'm also killing my service (even if <code>onDestroy()</code> is not called!!!) and then again <code>onCreate</code> is called and service is starting itself from scratch. But bluetooth communication is based on sockets so they are also recreated and my connection is lost. I also tried <code>START_NOT_STICKY</code> however then my service is destroyed as soon when I close my app and it's never recreated. Is it possible to keep service alive even (and not recreate it) after user closed my app? </p>