I know that onReceive() of the Broadcast receiver and handleMessage() of Handler run on the same UI thread. Suppose I want to communicate between two services, within the same a
Broadcast receiver calls are heavy operations and there are chances to get ANR's if an event is broadcasted for multiple times. And also the context you get in onReceive() of Broadcast receiver has limited usage until you get application context.
In contrast, handler calls are efficient as they are simple and runs in the different thread and no context is required to start a handler call. communicating between 2 services or activities or 2 threads can be easily handled using handler. Infact all the other ways viz.. Intents and Bound services use handlers internally for message passing.