title: How to run an infinite loop in Android without freezing the UI?
body: <p>I'm creating and android program which needs to to continuously keep sending data over the bluetooth now I use something like this:</p>
  
  <pre><code>for(;;)
  {
  //send message
  }
  </code></pre>
  
  <p>though this works it freezes my UI and app how can I implement the same without freezing my UI?</p>
  
  <p>I am sure that the app is sending the data as I monitor the data.</p>