Thanks very much for the feedback. 

When I mentioned that I used a thread, I meant that I extended the Thread 
class with the run() method being overriden. I'm at home at the moment so 
can't show some code. Basically I would start/stop the thread from a button 
'click' handlers. Inside the Run() method was simply a loop to perform the 
range measurements and sleep for the remainder of the 25ms. This solution 
didn't work because I couldn't update the UI entities from this thread. 
Runnable seems to be the better option for accessing views.

I appreciate that android is not a realtime system but thought that 40Hz 
wouldn't be too difficult to achieve, with the occasional overrun, which 
wouldn't impair my app. I am getting nowhere near this - even when I remove 
the range measurement functionality from the run method.

I'll investigate both the timer and scheduledThreadPoolExecutor.

Thanks again.

Marc

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to