title: Correct way to run a continuously called method in own thread?
body: <p>I'm calling methode doSomething() continuously with a thread.sleep(100). This happens in on the UIThread, so the UIthread gets unresponsive. What is the correct way in Android to run the method doSomething() or the entire someobject in a seperate thread?</p>
  
  <pre><code>public void loop(){
   while(true){
    someObject.doSomething();
    try {
         Thread.sleep(100);
    } catch (InterruptedException e) {
         e.printStackTrace();
    }
   }
  }
  </code></pre>
  
  <p>Right now i'm using </p>
  
  <pre><code> new Thread(new Runnable() {
      @Override
      public void run() {
            someObject.doSomething();
  
      }
   }).start();
  </code></pre>
  
  <p>This obviously creates a different thread for each iteration. I don't think this is the correct way. What is the correct way in Android?</p>