update UI from and event
I have a service which sends continously values to an activity through some custom event listeners. 

Here everything works fine. Certain values are displayed in my activity as expected, but some others make the application to crash. This is because some of the incoming data is calculated inside a normal thread (that I cannot have access for changing it), and I know I have to use a handler here, but as far as I tried the app still crashing. 

more graphically I would like to do the following 

    onValuesChanged(float val) { 
      myTextView.setText( Float.toString(val) )
    } 

where val is calculated in a normal thread, but of course it makes crash the app when doing the  setText. 

Any suggestions? 


update UI from and event
===

I have a service which sends continously values to an activity through some custom event listeners. 

Here everything works fine. Certain values are displayed in my activity as expected, but some others make the application to crash. This is because some of the incoming data is calculated inside a normal thread (that I cannot have access for changing it), and I know I have to use a handler here, but as far as I tried the app still crashing. 

more graphically I would like to do the following 

    onValuesChanged(float val) { 
      myTextView.setText( Float.toString(val) )
    } 

where val is calculated in a normal thread, but of course it makes crash the app when doing the  setText. 

Any suggestions? 

