In this post, we will learn about Broadcast receivers, an essential building block of Android system with a simple example.
What is Broadcast Receivers?
Broadcast Receivers is an Android implementation of system-wide publish/subscribe mechanism.
The receiver is simply a dormant code that gets activated once an event it is subscribed to happens.
The system itself broadcasts events all the time. For example, when an SMS arrives, or call comes in, or battery runs low, or system gets booted, all those events are broadcasted and any number of receivers could be triggered by them.