title: What is the way to make an infinite loop in a thread? android
body: <p>I want to make an infinite loop in android, to check if some apps are active.
  What is the best way to do this without using too much cpu?</p>
  
  <p>Maybe a while loop or a handler or something?</p>
  
  <p>Thanks,</p>
  
  <p>Peter</p>