title: Service restarted on Application Close - START_STICKY
body: <p>I have an app that runs as a web server. The app has a service that is START_STICKY I want this service to run the web server all the time (option is given to user in a notification to stop it).</p>
  
  <p>Problem is that the server is restarted (loosing settings etc) when i swipe my app closed. It stays there fine but logcat shows that it is restarting.</p>
  
  <p>I can re- open my app and bind to the new service, this works fine. Although swipe closing again has the same effect.</p>
  
  <p>I need this to NOT restart.</p>
  
  <p>Standard service code</p>
  
  <pre><code>private WebServerService mService;
  private ServiceConnection mConnection = new ServiceConnection() {
  
      @Override
      public void onServiceConnected(ComponentName className,
                                     IBinder binder) {
          WebServerService.MyBinder b = (WebServerService.MyBinder) binder;
          mService = b.getService();
      }
  
      public void onServiceDisconnected(ComponentName className) {
          mService = null;
      }
  };
  
  public serviceStart() {
      mIntent = new Intent(mContext.getApplicationContext(), WebServerService.class);
      mContext.startService(mIntent);
      mContext.bindService(mIntent, mConnection, Context.BIND_AUTO_CREATE);
  }
  </code></pre>
  
  <p>Service on start</p>
  
  <pre><code> @Override
  public int onStartCommand(Intent intent, int flags, int startId) {
      super.onStartCommand(intent, START_STICKY, startId);
      Log.d("SERVICE","Started");
      return START_STICKY;
  }
  </code></pre>