Google News
logo
Android - Interview Questions
What are broadcast receivers? How is it implemented?
* Broadcast Receiver is a mechanism using which host application can listen for System level events.
* Broadcast receiver is used by the application whenever they need to perform the execution based on system events. Like listening for Incoming call, sms etc.
* Broadcast receivers helps in responding to broadcast messages from other application or from the system.
* It is used to handle communication between Android operating system and applications. 

It is implemented as a subclass of BroadcastReceiver class and each message is broadcaster as an Intent object.
public class MyReceiver extends BroadcastReceiver {
  Public void onReceive(context,intent){}
}

 

Advertisement