title: Create only one instance of Service (Android)
body: <p>How can I make sure that only one instance of Service is created?</p>
  
  <p>I have checked some functions with logging (WeatherService is the class who extends Service):</p>
  
  <pre><code>Log.i(TAG, "Start  Id:" + WeatherService.this.hashCode());
  Log.i(TAG, "End Id:" + WeatherService.this.hashCode());
  </code></pre>
  
  <p>It gives different hash codes even when I am sure that the same function is running twice (downloading):</p>
  
  <pre><code>09-12 01:00:55.195: INFO/WeatherService(7222): Start  Id:1137653208
  09-12 01:00:57.235: INFO/WeatherService(7222): Start  Id:1137654296
  09-12 01:00:59.035: INFO/WeatherService(7222): Start  Id:1138806536
  09-12 01:01:39.085: INFO/WeatherService(7222): End Id:1137654296
  09-12 01:01:39.265: INFO/WeatherService(7222): Start  Id:1137654296
  09-12 01:02:22.175: INFO/WeatherService(7222): End Id:1137653208
  09-12 01:02:24.815: INFO/WeatherService(7222): End Id:1138806536
  09-12 01:02:24.836: INFO/WeatherService(7222): Start  Id:1138806536
  09-12 01:02:40.275: INFO/WeatherService(7222): End Id:1137654296
  </code></pre>
  
  <p>I am binding a Activity to the service with:</p>
  
  <pre><code>bindService(new Intent(getApplicationContext(),  WeatherService.class)
                                 ,mServiceConnection, BIND_AUTO_CREATE);
  </code></pre>
  
  <p>And the service can run for minutes until it is completed, therefore the service can be binded to/created by many Activities</p>