title: Android Looper and Thread doesn't seem to work
body: <p>Hi I am trying to use a thread with a handler and a looper in Android.</p>
  
  <p>Thread class:</p>
  
  <pre><code>public void run() {
      Looper.prepare();
  
      handler = new AndroidHandler(context);
      Looper.loop();
  
      while (!stopMe) {
                         someMethod();
                 }
             ((Handler) handler).getLooper().quit();
   }
  
  public void someMethod(){
    Log.i("New System", "Handling ");
      order ++;
      Message m=handler.obtainMessage();
      m.arg1=order;
      handler.sendMessage(m);
   }
  </code></pre>
  
  <p>in a separate class:</p>
  
  <pre><code>public class AndroidHandler extends Handler{
     public AndroidHandle(Context){
          super();
    }
     public void dispatchMessage(Message m) {
      super.dispatchMessage(m);
  
  }
     @Override
  public void handleMessage(Message msg) {
  
      Log.i("New System", "handling Message "+msg.arg1);
     }
   }
  </code></pre>
  
  <p>It doens't work!!! messages aren't being sent and nothing is getting printed in the console and I don't know how to fix it.... What is the problem here any ideas? thanks</p>
  
  <p>ps: I don't want to use the ui thread I want to do this in a separate thread. </p>