title: android service start time
body: <p>I have a problem implementing what should be a simple example with services.
  Following the Android developer scheme I managed to Bind to a service. The service works perfectly.</p>
  
  <p>What i want to implement is the starting Date of the Service. I have in the </p>
  
  <pre><code>public class MyService extends Service {
  
      private Date _firstActivation= new Date();
      ....
      ....
      public Date GetFirstActivation() {
      return _firstActivation;
  }
  }
  </code></pre>
  
  <p>In the main activity that binds to the service I have a basic implementation during the OnStart method </p>
  
  <pre><code> // Check if the Service is running and if it's running let's bind to the service through ServiceConnectionClass
      if (((MyApplication)getApplication())._serviceIsRunning)
      {
          Intent intent = new Intent(this, MyService.class);
          bindService(intent, mConnection, 0);
          _startingTime_TV.setText(_df.format(_myService.GetFirstActivation()));
      }
      else {
          _startingTime_TV.setText("Service Not Started");
      }
  </code></pre>
  
  <p>where _myService is the MyService and mConnection is the ServiceConnection...</p>
  
  <p>Now what i expect is that once the service has started the first time, each time i Stop the activity (and at the same time unbind) and restart the activity (and at the same time bind) on the textview I can see always the same starting time.</p>
  
  <p>What happens in that the time changes everytime i restart the activity... </p>
  
  <p>Does anyone has a clue?</p>