I'm relatively new to the "Looper-Handler" term. I'm pretty clear with the way they work but still confused with their architecture. I've also gone through couple of SO questions, but still I have some questions regarding them.
To get them clear and to summarize, can anyone answer for the below questions?
- Is it true that the
Handlerbelong to the thread in which it was created ? - I'm aware that there can be multiple instances of handler per
Looper/MeesageQueuepair. Is it possible create ahandlerfor a thread from some other Thread? - Suppose, in the main thread we write
Handler handler = new Handler (x.getLooper())where x is thehandlerof another thread X, then to which MessageQueuehandlerwill actually post?
If I'm getting wrong anywhere, please make me correct. Thanks.