title: Android thread and handler , does not found mistake
body: <p>Hallo,</p>
  
  <p>I'am new with threading and so I read an article/tutorial about it...
  <a href="http://indyvision.net/2010/02/android-threads-tutorial-part-3/" rel="nofollow">tutorial</a></p>
  
  <p>My goal is to update the textview in the gui from the thread...</p>
  
  <pre><code>public class recorderThread extends Thread {
  public boolean recording = true;  //variable to start or stop recording
  public int frequency; //the public variable that contains the frequency value "heard", it is updated continually while the thread is     running.
  int numSamples;
  AudioRecord recorder;
  int numCrossing,p;
  short audioData[];
  int bufferSize;
  private Handler parentHandler;
  
  public recorderThread (Handler parentHandle ) {
   this.parentHandler = parentHandle;
  }    
  @Override
  public void run() {
  doingSuff();
  Message msgn = new Message() ;
  msgn.arg1 = frequency;  
  /* Sending the message */
  parentHandler.sendMessage(msgn);
  } //while recording
  
  
  
    }//run   
  }//recorderThread
  </code></pre>
  
  <p>And the activity</p>
  
  <pre><code>public class sonicDistance extends Activity {
  
  
  recorderThread rthread ;
  static TextView freq;
  static TextView duration;
  static TextView samplerate;
  private static TextView temperature;
  static TextView measuredDistance;
  private static TextView measuredTimeDiff;
  public static TextView measuredFrequenz;
  private CustomDialog myfreqDialog;
  static double startTime = 0;
  static double endTime = 0;
  private static float c_propagation = 0;
  private static float choosen_temperature = 20;
  static double messureFreq = 0;
  
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
      freq =((TextView) findViewById(R.id._freqOfTone));
      duration =((TextView) findViewById(R.id.duration));
      samplerate = ((TextView) findViewById(R.id.Samplerate));
      temperature  = ((TextView) findViewById(R.id.temperature));
      measuredFrequenz = ((TextView) findViewById(R.id._messuredFrequenz));
      measuredDistance = ((TextView) findViewById(R.id.distance));
      measuredTimeDiff = ((TextView) findViewById(R.id._timediff));
  
       rthread = new recorderThread(myHandler);
       rthead.run();
  
      }
  public Handler myHandler = new Handler(){
      public void handleMessage(Message msg) {
              System.out.println(msg.arg1);
              setTemperature(Float.valueOf((String)msg.obj));
              System.out.println("test" + Float.valueOf((String)msg.obj));
      }
  
      };
  
  
  @Override
  protected void onResume(){
      super.onResume();
  }
  
  }
  </code></pre>
  
  <p>There is no system.out in the activity from the handler. I think this one is never called.</p>
  
  <p>I don't know where is my mistake..</p>
  
  <p>thank You</p>