What is a Handler & what is the function of the Handler in Android?
Handler : is used to communicate between two threads.
Use of Handler: If you want to send or pass some message from one thread to other thread, then we can use Handlers.
1. A thread can have n number of handlers allowing other threads to communicate with it.
2. If we have Thread-A and Thread-B, and if Thread-B wants to send a message to Thread-A, then We have to create a handler
for Thread-A and send message to that handler. Via handler Thread-B can send messages to Thread-A.
Back To Top