title: Keep running timer after killing application
body: <p>I have the following timer in my application:</p>
  
  <pre><code>public class MainScreen extends ApplicationActivity {
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main_screen);
  
          Timer timer = new Timer();
          timer.scheduleAtFixedRate(new ScheduleSomething(), 1000, 1000);
      }
  
      public static class ScheduleSomething extends TimerTask {
          @Override
          public void run() {
              System.out.println("This is a test!");
          }
      }
  }
  </code></pre>
  
  <p>Each second the message "This is a test!" is displayed, but when I close the application it stops the timer also.
  Is there any way to keep this timer running when I close the application?</p>
  
  <p>I tried to:</p>
  
  <pre><code>public void onStop(Bundle savedInstanceState) {
      super.onStop(savedInstanceState);
  
      Timer timer = new Timer();
      timer.scheduleAtFixedRate(new ScheduleSomething(), 1000, 1000);
  }
  
  public void onDestroy(Bundle savedInstanceState) {
      super.onDestroy(savedInstanceState);
  
      Timer timer = new Timer();
      timer.scheduleAtFixedRate(new ScheduleSomething(), 1000, 1000);
  }
  </code></pre>
  
  <p>But it doesn't work... </p>