I am fairly certain that your problem has nothing to do with message 
passing.  The basic messaging idiom you are using works just fine and you 
can, in a few minute and a few lines of code, verify that messages are 
passed immediately, not in 60 seconds.

 In particular, btw, the extra thread in your implementation is kind of 
pointless.  The Handler can easily just reschedule itself each time it is 
called.  That also makes it much easier to handle onPause and onResume... 
which, I assume, is something of concern to you.

I know you didn't ask but, IMO, your code could use some serious 
reorganization.  That sure would make it easier for me to find the 
problem... and it might even make it easier for you to find it.

I believe that the actual "message passing" happens through the data member 
"m".  You should be certain that it is being accessed from only one thread 
-- that the code in the case statement runs in the same thread as the 
Handler.

G. Blake Meike
Marakana

The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do

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

Reply via email to