title: Calling thread repeatedly causing Ui hang in android
body: <p>I am developing a Bluetooth application.In that I have 1 button, on click of the button I am starting a thread.Inside the thread, I am discovering and connecting ble devices.Repeated click of the button causing the UI to hang.</p>
  
  <p>Code I am using to create the thread is:</p>
  
  <pre><code>new Thread(new Runnable() {
              @Override
              public void run() {
  //do bluetooth stuffs
  
              }
          }).start();
  </code></pre>
  
  <p>I am not stopping this thread anywhere.</p>
  
  <p>I don't know what is causing the UI to hang please help me.</p>