Greetings Experts,

Recently I had to develop a back ground service where it was
instantiating a worker thread thread class as soon as the service gets
created. The worker thread goes in to an infinite loop listening for
requests.

It was working fine in the emulator and when I ported on to the device
it was throwing  exception "Can't create handler for message
Looper.loop()".  Later on I had fixed the issue by creating a handler
as per Android documentation and it worked fine.

The first question.
-----------------------

What is the magic behind the handler looper.loop  and the handler
handle message. How it is getting called internally what is invoking
handle message inside the Handler. Why should I use Handler to solve
this problem ?

Second Question:
------------------------

Why did it worked fine in the emulator but not on the device ?

Please help me in understanding this concept.

Thanks,
Arjun.

-- 
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